use of org.ovirt.engine.core.common.queries.DirectoryIdQueryParameters in project ovirt-engine by oVirt.
the class BackendDomainUserResource method get.
@Override
public User get() {
String directoryId;
try {
directoryId = DirectoryEntryIdUtils.decode(id);
} catch (IllegalArgumentException exception) {
throw new WebApplicationException(Response.Status.NOT_FOUND);
}
String directory = parent.getDirectory().getName();
DirectoryIdQueryParameters parameters = new DirectoryIdQueryParameters(directory, directoryId);
return performGet(QueryType.GetDirectoryUserById, parameters, BaseResource.class);
}
use of org.ovirt.engine.core.common.queries.DirectoryIdQueryParameters in project ovirt-engine by oVirt.
the class BackendUsersResource method getUserById.
private DirectoryUser getUserById(String directoryName, String namespace, String userId) {
DirectoryUser result;
try {
userId = DirectoryEntryIdUtils.decode(userId);
} catch (IllegalArgumentException exception) {
return null;
}
result = getEntity(DirectoryUser.class, QueryType.GetDirectoryUserById, new DirectoryIdQueryParameters(directoryName, namespace, userId), userId, true);
return result;
}
use of org.ovirt.engine.core.common.queries.DirectoryIdQueryParameters in project ovirt-engine by oVirt.
the class BackendDomainGroupResource method get.
@Override
public Group get() {
String directoryId;
try {
directoryId = DirectoryEntryIdUtils.decode(id);
} catch (IllegalArgumentException exception) {
throw new WebApplicationException(Response.Status.NOT_FOUND);
}
String directory = parent.getDirectory().getName();
DirectoryIdQueryParameters parameters = new DirectoryIdQueryParameters(directory, directoryId);
return performGet(QueryType.GetDirectoryGroupById, parameters, BaseResource.class);
}
Aggregations