use of org.bimserver.database.actions.GetExtendedDataSchemaByNameDatabaseAction in project BIMserver by opensourceBIM.
the class ServiceImpl method getExtendedDataSchemaByName.
public SExtendedDataSchema getExtendedDataSchemaByName(String nameSpace) throws UserException, ServerException {
// Not checking for real authentication here because a remote service should be able to use an exs
if (nameSpace == null) {
throw new UserException("Name required");
}
requireAuthenticationAndRunningServer();
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
return getBimServer().getSConverter().convertToSObject(session.executeAndCommitAction(new GetExtendedDataSchemaByNameDatabaseAction(session, getInternalAccessMethod(), nameSpace)));
} catch (Exception e) {
return handleException(e);
} finally {
session.close();
}
}
Aggregations