public List<String> getAllPagesForProfile(final long profileId) { try { return applicationService.getAllPagesForProfile(profileId); } catch (final SBonitaReadException e) { throw new RetrieveException(e); } } public List<String> getAllPagesForProfile(String profile) {
public long count() { try { return service.getNumberOfCustomUserInfoDefinition(); } catch (SIdentityException e) { throw new RetrieveException(e); } } }
public List<CustomUserInfoDefinition> list(final int startIndex, final int maxResult) { try { List<CustomUserInfoDefinition> definitions = new ArrayList<CustomUserInfoDefinition>(); for (SCustomUserInfoDefinition sDefinition : service.getCustomUserInfoDefinitions(startIndex, maxResult)) { definitions.add(ModelConvertor.convert(sDefinition)); } return definitions; } catch (SIdentityException e) { throw new RetrieveException(e); } }
@Deprecated @Override public List<Comment> getComments(final long processInstanceId) { final TenantServiceAccessor tenantAccessor = getTenantAccessor(); final SCommentService commentService = tenantAccessor.getCommentService(); try { final List<SComment> sComments = commentService.getComments(processInstanceId); return ModelConvertor.toComments(sComments); } catch (final SBonitaReadException sbe) { throw new RetrieveException(sbe); } }
@Override public List<ProcessDeploymentInfo> getProcessDeploymentInfosUnrelatedToCategory(final long categoryId, final int startIndex, final int maxResults, final ProcessDeploymentInfoCriterion sortingCriterion) { final TenantServiceAccessor tenantAccessor = getTenantAccessor(); final ProcessDefinitionService processDefinitionService = tenantAccessor.getProcessDefinitionService(); try { return ModelConvertor.toProcessDeploymentInfo(processDefinitionService.getProcessDeploymentInfosUnrelatedToCategory(categoryId, startIndex, maxResults, sortingCriterion)); } catch (final SBonitaException e) { throw new RetrieveException(e); } }
@Override public Map<Long, ProcessDeploymentInfo> getProcessDeploymentInfosFromArchivedProcessInstanceIds(final List<Long> archivedProcessInstantsIds) { final TenantServiceAccessor tenantAccessor = getTenantAccessor(); final ProcessDefinitionService processDefinitionService = tenantAccessor.getProcessDefinitionService(); try { final Map<Long, SProcessDefinitionDeployInfo> sProcessDeploymentInfos = processDefinitionService .getProcessDeploymentInfosFromArchivedProcessInstanceIds(archivedProcessInstantsIds); return ModelConvertor.toProcessDeploymentInfos(sProcessDeploymentInfos); } catch (final SBonitaException e) { throw new RetrieveException(e); } }
@Override public Serializable getUserTaskContractVariableValue(final long userTaskInstanceId, final String name) throws ContractDataNotFoundException { final ContractDataService contractDataService = getTenantAccessor().getContractDataService(); try { return contractDataService.getArchivedUserTaskDataValue(userTaskInstanceId, name); } catch (final SContractDataNotFoundException scdnfe) { throw new ContractDataNotFoundException(scdnfe); } catch (final SBonitaReadException sbe) { throw new RetrieveException(sbe); } }
public ApplicationPage getApplicationPage(final long applicationPageId) throws ApplicationPageNotFoundException { try { final SApplicationPage sApplicationPage = applicationService.getApplicationPage(applicationPageId); return converter.toApplicationPage(sApplicationPage); } catch (final SBonitaReadException e) { throw new RetrieveException(e); } catch (final SObjectNotFoundException e) { throw new ApplicationPageNotFoundException(e.getMessage()); } }
public ApplicationPage getApplicationHomePage(final long applicationId) throws ApplicationPageNotFoundException { SApplicationPage sHomePage; try { sHomePage = applicationService.getApplicationHomePage(applicationId); return converter.toApplicationPage(sHomePage); } catch (final SBonitaReadException e) { throw new RetrieveException(e); } catch (final SObjectNotFoundException e) { throw new ApplicationPageNotFoundException(e.getMessage()); } }
public ApplicationMenu getApplicationMenu(final long applicationMenuId) throws ApplicationMenuNotFoundException { try { final SApplicationMenu sApplicationMenu = applicationService.getApplicationMenu(applicationMenuId); return converter.toApplicationMenu(sApplicationMenu); } catch (final SObjectNotFoundException e) { throw new ApplicationMenuNotFoundException(e.getMessage()); } catch (final SBonitaException e) { throw new RetrieveException(e); } }
@Override public long getNumberOfProcessDeploymentInfos() { final TenantServiceAccessor tenantAccessor = getTenantAccessor(); final ProcessDefinitionService processDefinitionService = tenantAccessor.getProcessDefinitionService(); final TransactionContentWithResult<Long> transactionContentWithResult = new GetNumberOfProcessDeploymentInfos(processDefinitionService); try { transactionContentWithResult.execute(); return transactionContentWithResult.getResult(); } catch (final SBonitaException e) { throw new RetrieveException(e); } }
@Override public ProcessDeploymentInfo getProcessDeploymentInfo(final long processDefinitionId) throws ProcessDefinitionNotFoundException { final TenantServiceAccessor tenantAccessor = getTenantAccessor(); final ProcessDefinitionService processDefinitionService = tenantAccessor.getProcessDefinitionService(); try { return ModelConvertor.toProcessDeploymentInfo(processDefinitionService.getProcessDeploymentInfo(processDefinitionId)); } catch (final SProcessDefinitionNotFoundException e) { throw new ProcessDefinitionNotFoundException(e); } catch (final SBonitaReadException e) { throw new RetrieveException(e); } }
@Override public SearchResult<CustomUserInfoValue> searchCustomUserInfoValues(final SearchOptions options) { try { return createCustomUserInfoValueAPI().search(getTenantAccessor().getSearchEntitiesDescriptor().getSearchCustomUserInfoValueDescriptor(), options); } catch (final SBonitaException e) { throw new RetrieveException(e); } }
@Override public long getNumberOfUsers() { final TenantServiceAccessor tenantAccessor = getTenantAccessor(); final IdentityService identityService = tenantAccessor.getIdentityService(); try { final GetNumberOfInstance transactionContent = new GetNumberOfInstance("getNumberOfUsers", identityService); transactionContent.execute(); return transactionContent.getResult(); } catch (final SBonitaException sbe) { throw new RetrieveException(sbe); } }
@Override public Icon getIcon(long id) throws NotFoundException { try { SIcon icon = getTenantAccessor().getIdentityService().getIcon(id); if (icon == null) { throw new NotFoundException("unable to find icon with id " + id); } return ModelConvertor.toIcon(icon); } catch (SBonitaReadException e) { throw new RetrieveException(e); } }
@Override public List<CommandDescriptor> getCommands(final int startIndex, final int maxResults, final CommandCriterion sort) { final PlatformServiceAccessor platformAccessor = getPlatformServiceAccessor(); final PlatformCommandService platformCommandService = platformAccessor.getPlatformCommandService(); try { final GetSPlatformCommands getPlatformCommands = new GetSPlatformCommands(platformCommandService, startIndex, maxResults, sort); getPlatformCommands.execute(); return ModelConvertor.toPlatformCommandDescriptors(getPlatformCommands.getResult()); } catch (final SBonitaException e) { throw new RetrieveException(e); } }
@Override public List<CommandDescriptor> getUserCommands(final int startIndex, final int maxResults, final CommandCriterion sort) { final CommandService commandService = getTenantAccessor().getCommandService(); try { final GetCommands getCommands = new GetCommands(commandService, startIndex, maxResults, sort); getCommands.execute(); return ModelConvertor.toCommandDescriptors(getCommands.getResult()); } catch (final SBonitaException e) { throw new RetrieveException(e); } }
@Override public List<User> getUsersWithManager(long managerId, int startIndex, int maxResults, UserCriterion criterion) { final TenantServiceAccessor tenantAccessor = getTenantAccessor(); final IdentityService identityService = tenantAccessor.getIdentityService(); final SUserBuilderFactory sUserfactory = BuilderFactory.get(SUserBuilderFactory.class); Sort sort = getSortFromCriterion(criterion, sUserfactory); try { return ModelConvertor.toUsers(identityService.getUsersWithManager(managerId, startIndex, maxResults, sort.getField(), sort.getOrder())); } catch (final SBonitaException sbe) { throw new RetrieveException(sbe); } }
@Override public List<User> getActiveUsersWithManager(long managerId, int startIndex, int maxResults, UserCriterion criterion) { final TenantServiceAccessor tenantAccessor = getTenantAccessor(); final IdentityService identityService = tenantAccessor.getIdentityService(); final SUserBuilderFactory sUserfactory = BuilderFactory.get(SUserBuilderFactory.class); Sort sort = getSortFromCriterion(criterion, sUserfactory); try { return ModelConvertor.toUsers(identityService.getActiveUsersWithManager(managerId, startIndex, maxResults, sort.getField(), sort.getOrder())); } catch (final SBonitaException sbe) { throw new RetrieveException(sbe); } }
@Override public List<UserMembership> getUserMembershipsByGroup(final long groupId, final int startIndex, final int maxResults) { final TenantServiceAccessor tenantAccessor = getTenantAccessor(); final IdentityService identityService = tenantAccessor.getIdentityService(); final GetUserMembershipsOfGroup transactionContentWithResult = new GetUserMembershipsOfGroup(groupId, identityService, startIndex, maxResults); try { transactionContentWithResult.execute(); return ModelConvertor.toUserMembership(transactionContentWithResult.getResult()); } catch (final SBonitaException sbe) { throw new RetrieveException(sbe); } }