use of net.geoprism.GeoprismUser in project geoprism-registry by terraframe.
the class CurationService method details.
@Request(RequestType.SESSION)
public JsonObject details(String sessionId, String historyId, boolean onlyUnresolved, int pageSize, int pageNumber) {
final ListCurationHistory hist = ListCurationHistory.get(historyId);
final ListTypeVersion version = hist.getVersion();
final ListType listType = version.getListType();
final ListCurationJob job = (ListCurationJob) hist.getAllJob().getAll().get(0);
final GeoprismUser user = GeoprismUser.get(job.getRunAsUser().getOid());
final ServerGeoObjectType serverGOT = listType.getGeoObjectType();
final String orgCode = listType.getOrganization().getCode();
this.checkPermissions(orgCode, serverGOT);
JsonObject jo = this.serializeHistory(hist, user, job);
jo.add("page", this.page(sessionId, historyId, onlyUnresolved, pageSize, pageNumber));
return jo;
}
use of net.geoprism.GeoprismUser in project geoprism-registry by terraframe.
the class AccountServiceControllerTest method deleteUser.
public void deleteUser(String username) {
GeoprismUserQuery query = new GeoprismUserQuery(new QueryFactory());
query.WHERE(query.getUsername().EQ(username));
OIterator<? extends GeoprismUser> it = query.getIterator();
try {
if (it.hasNext()) {
GeoprismUser user = it.next();
UserInfo info = UserInfo.getByUser(user);
if (info != null) {
info.delete();
}
user.delete();
}
} finally {
it.close();
}
}
Aggregations