private SDocument insertDocument(final SDocument document) throws SRecorderException { recorder.recordInsert(new InsertRecord(document), DOCUMENT); return document; }
@Override public ArchivedPersistentObject getEntity() { return (ArchivedPersistentObject) super.getEntity(); }
private SCategory addCategory(final String name, final String description) throws SCategoryCreationException { final SCategoryLogBuilder logBuilder = getQueriableLog(ActionType.CREATED, "Creating a new category with name " + name); final long creator; creator = getCreator(); final SCategory sCategory = BuilderFactory.get(SCategoryBuilderFactory.class).createNewInstance(name, creator).setDescription(description).done(); final InsertRecord insertRecord = new InsertRecord(sCategory); try { recorder.recordInsert(insertRecord, CATEGORY); initiateLogBuilder(insertRecord.getEntity().getId(), SQueriableLog.STATUS_OK, logBuilder, "addCategory"); return sCategory; } catch (final SRecorderException e) { initiateLogBuilder(insertRecord.getEntity().getId(), SQueriableLog.STATUS_FAIL, logBuilder, "addCategory"); throw new SCategoryCreationException(e); } }
private SCategory addCategory(final String name, final String description) throws SCategoryCreationException { final SCategoryLogBuilder logBuilder = getQueriableLog(ActionType.CREATED, "Creating a new category with name " + name); final long creator; creator = getCreator(); final SCategory sCategory = BuilderFactory.get(SCategoryBuilderFactory.class).createNewInstance(name, creator).setDescription(description).done(); final InsertRecord insertRecord = new InsertRecord(sCategory); try { recorder.recordInsert(insertRecord, CATEGORY); initiateLogBuilder(insertRecord.getEntity().getId(), SQueriableLog.STATUS_OK, logBuilder, "addCategory"); return sCategory; } catch (final SRecorderException e) { initiateLogBuilder(insertRecord.getEntity().getId(), SQueriableLog.STATUS_FAIL, logBuilder, "addCategory"); throw new SCategoryCreationException(e); } }
private void insertUser(SUser hashedUser) throws SRecorderException { final InsertRecord insertRecord = new InsertRecord(hashedUser); recorder.recordInsert(insertRecord, USER_LOGIN); }
@Override public ArchivedPersistentObject getEntity() { return (ArchivedPersistentObject) super.getEntity(); }
private SDocument insertDocument(final SDocument document) throws SRecorderException { recorder.recordInsert(new InsertRecord(document), DOCUMENT); return document; }
@Override public void recordInsert(final InsertRecord record, String type) throws SRecorderException { try { persistenceService.insert(record.getEntity()); eventService.fireEvent(createInsertEvent(record.getEntity(), type)); } catch (final Exception e) { logExceptionsFromHandlers(e); throw new SRecorderException(e); } }
private void insert(PersistentObject object, String eventType) throws SRecorderException { recorder.recordInsert(new InsertRecord(object), eventType); }
@Override public void recordInsert(final InsertRecord record, String type) throws SRecorderException { try { persistenceService.insert(record.getEntity()); eventService.fireEvent(createInsertEvent(record.getEntity(), type)); } catch (final Exception e) { logExceptionsFromHandlers(e); throw new SRecorderException(e); } }
private void insertUser(SUser hashedUser) throws SRecorderException { final InsertRecord insertRecord = new InsertRecord(hashedUser); recorder.recordInsert(insertRecord, USER_LOGIN); }
private void insert(PersistentObject object, String eventType) throws SRecorderException { recorder.recordInsert(new InsertRecord(object), eventType); }
private void create(final PersistentObject persistentObject, final String eventType) throws SRecorderException { recorder.recordInsert(new InsertRecord(persistentObject), eventType); }
private void create(final PersistentObject persistentObject, final String eventType) throws SRecorderException { recorder.recordInsert(new InsertRecord(persistentObject), eventType); }
@Override public void add(String name, TenantResourceType type, byte[] content, long userId) throws SRecorderException { if (content != null && content.length > 0) { STenantResource resource = new STenantResource(name, type, content, userId, Instant.now().toEpochMilli(), INSTALLED); recorder.recordInsert(new InsertRecord(resource), TENANT_RESOURCE); } else { logger.log(this.getClass(), TechnicalLogSeverity.WARNING, "Tenant resource file contains an empty file " + name + " that will be ignored. Check that this is not a mistake."); } }
@Override public void add(String name, TenantResourceType type, byte[] content, long userId) throws SRecorderException { if (content != null && content.length > 0) { STenantResource resource = new STenantResource(name, type, content, userId, Instant.now().toEpochMilli(), INSTALLED); recorder.recordInsert(new InsertRecord(resource), TENANT_RESOURCE); } else { logger.log(this.getClass(), TechnicalLogSeverity.WARNING, "Tenant resource file contains an empty file " + name + " that will be ignored. Check that this is not a mistake."); } }
@Override public void add(long processDefinitionId, String name, BARResourceType type, byte[] content) throws SRecorderException { SBARResource resource = new SBARResource(name, type, processDefinitionId, content); recorder.recordInsert(new InsertRecord(resource), BAR_RESOURCE); }
@Override public SCustomUserInfoValue createCustomUserInfoValue(final SCustomUserInfoValue customUserInfo) throws SIdentityException { try { recorder.recordInsert(new InsertRecord(customUserInfo), CUSTOM_USER_INFO_VALUE); return customUserInfo; } catch (final SRecorderException e) { throw new SIdentityException("Can't add custom user info value " + customUserInfo, e); } }
@Override public void createConnectorInstance(final SConnectorInstance connectorInstance) throws SConnectorInstanceCreationException { try { recorder.recordInsert(new InsertRecord(connectorInstance), CONNECTOR_INSTANCE); } catch (final SRecorderException e) { throw new SConnectorInstanceCreationException(e); } }
SPageMapping insert(final SPageMappingImpl entity) throws SObjectCreationException { try { recorder.recordInsert(new InsertRecord(entity), PAGE_MAPPING); } catch (final SRecorderException e) { throw new SObjectCreationException(e); } return entity; }