Search in sources :

Example 1 with GetObjectIDMByNameDatabaseAction

use of org.bimserver.database.actions.GetObjectIDMByNameDatabaseAction in project BIMserver by opensourceBIM.

the class PluginServiceImpl method getObjectIDMByName.

@Override
public SObjectIDMPluginConfiguration getObjectIDMByName(String ObjectIDMName) throws ServerException, UserException {
    requireRealUserAuthentication();
    DatabaseSession session = getBimServer().getDatabase().createSession();
    try {
        return getBimServer().getSConverter().convertToSObject(session.executeAndCommitAction(new GetObjectIDMByNameDatabaseAction(session, getInternalAccessMethod(), ObjectIDMName)));
    } catch (Exception e) {
        handleException(e);
    } finally {
        session.close();
    }
    return null;
}
Also used : GetObjectIDMByNameDatabaseAction(org.bimserver.database.actions.GetObjectIDMByNameDatabaseAction) DatabaseSession(org.bimserver.database.DatabaseSession) IOException(java.io.IOException) ServerException(org.bimserver.shared.exceptions.ServerException) BimserverDatabaseException(org.bimserver.BimserverDatabaseException) UserException(org.bimserver.shared.exceptions.UserException)

Aggregations

IOException (java.io.IOException)1 BimserverDatabaseException (org.bimserver.BimserverDatabaseException)1 DatabaseSession (org.bimserver.database.DatabaseSession)1 GetObjectIDMByNameDatabaseAction (org.bimserver.database.actions.GetObjectIDMByNameDatabaseAction)1 ServerException (org.bimserver.shared.exceptions.ServerException)1 UserException (org.bimserver.shared.exceptions.UserException)1