use of org.openntf.domino.Name in project org.openntf.domino by OpenNTF.
the class Session method getUserNameCollection.
/*
* (non-Javadoc)
*
* @see org.openntf.domino.Session#getUserNameCollection()
*/
@Override
public Collection<String> getUserNameCollection() {
Collection<String> result = new ArrayList<String>();
Vector<org.openntf.domino.Name> v = this.getUserNameList();
if (!v.isEmpty()) {
for (org.openntf.domino.Name name : v) {
result.add(name.getCanonical());
// DominoUtils.incinerate(name);
}
}
return result;
}
use of org.openntf.domino.Name in project org.openntf.domino by OpenNTF.
the class UserProvider method processRequest.
@Override
public Object processRequest(FramedGraph graph, String item, MultivaluedMap<String, String> params) {
Map<String, Object> result = new LinkedHashMap<String, Object>();
try {
Session session = Factory.getSession(SessionType.CURRENT);
String userName = session.getEffectiveUserName();
result.put("username", userName);
Name name = session.createName(userName);
Collection<String> groups = name.getGroups("");
result.put("groups", groups);
} catch (Throwable t) {
t.printStackTrace();
}
return result;
}
use of org.openntf.domino.Name in project org.openntf.domino by OpenNTF.
the class TestName method testEmptyName.
/**
* Tests for https://github.com/OpenNTF/org.openntf.domino/issues/146 , where this
* method throws a NullPointerException.
*/
@Test
public void testEmptyName() {
Name n = Factory.getSession().createName("");
n.getAddr821();
}
use of org.openntf.domino.Name in project org.openntf.domino by OpenNTF.
the class Session method getUserGroupNameCollection.
/*
* (non-Javadoc)
*
* @see org.openntf.domino.Session#getUserGroupNameCollection()
*/
@Override
public Collection<String> getUserGroupNameCollection() {
Collection<String> result = new ArrayList<String>();
java.util.Vector<org.openntf.domino.Name> v = this.getUserGroupNameList();
if (!v.isEmpty()) {
for (org.openntf.domino.Name name : v) {
result.add(name.getCanonical());
// DominoUtils.incinerate(name);
}
}
return result;
}
Aggregations