public RoleImpl(final String uuid, final String name) { super(); Misc.checkArgsNotNull(uuid, name); this.uuid = uuid; this.name = name; }
@Override public String getAMetaData(final String key) { Misc.checkArgsNotNull(key); if (metadata == null) { return null; } return metadata.get(key); }
/** * @param entities * must be not null */ public void removeEntities(final Collection<String> entities) { Misc.checkArgsNotNull(entities); if (this.entities != null && !this.entities.isEmpty()) { this.entities.removeAll(entities); } }
/** * @param roles * must be not null */ public void addRoles(final Collection<String> roles) { Misc.checkArgsNotNull(roles); if (this.roles == null) { this.roles = new HashSet<String>(); } this.roles.addAll(roles); }
public void addAttachment(final AttachmentDefinition attach) { Misc.checkArgsNotNull(attach); if (attachments == null) { attachments = new HashSet<AttachmentDefinition>(); } attachments.add(attach); }
public ProfileMetadataImpl(String name) { Misc.checkArgsNotNull(name); this.uuid = UUID.randomUUID().toString(); this.name = name; }
public AttachmentInstanceImpl(final DocumentUUID attachmentUUID, String name, ProcessInstanceUUID processInstanceUUID, String author, Date versionDate) { Misc.checkArgsNotNull(name, processInstanceUUID, author, versionDate); this.attachmentUUID = attachmentUUID; this.name = name; this.processInstanceUUID = processInstanceUUID; this.author = author; this.versionDate = Misc.getTime(versionDate); }
protected RuleImpl(final RuleType type) { super(); Misc.checkArgsNotNull(type); uuid = UUID.randomUUID().toString(); this.type = type.name(); }
public static BusinessArchive getBusinessArchive(final ProcessDefinition process, final Class< ? >... classes) throws IOException, ClassNotFoundException { Misc.checkArgsNotNull(process); return new BusinessArchiveImpl(process, null, classes); }
protected RuleImpl(final RuleType type) { super(); Misc.checkArgsNotNull(type); uuid = UUID.randomUUID().toString(); this.type = type.name(); }
/** * @param exceptions * must be not null */ protected <E extends AbstractUUID> void removeExceptions(final Collection<E> exceptions) { Misc.checkArgsNotNull(exceptions); if (this.exceptions != null && !this.exceptions.isEmpty()) { for (final AbstractUUID exception : exceptions) { this.exceptions.remove(exception.getValue()); } } }
@Override public List<Long> getTaskInstancesWaitingTimeFromTaskUUIDs(final Set<ActivityDefinitionUUID> tasksUUIDs, final Date since, final Date until) { Misc.checkArgsNotNull(tasksUUIDs); if (since.getTime() > until.getTime()) { throw new IllegalArgumentException("The since date is greater than the until date"); } if (tasksUUIDs.isEmpty()) { return Collections.emptyList(); } return EnvTool.getAllQueriers(getQueryList()).getTaskInstancesWaitingTimeFromTaskUUIDs(tasksUUIDs, since, until); }
/** * Create a new boolean expression. * @param expression the expression * @throws InvalidExpressionException if the expression is not valid */ public BooleanExpression(final String expression) throws InvalidExpressionException { Misc.checkArgsNotNull(expression); tokens = new Vector<String>(); checkExpression(formatExpression(expression)); }
@Override public List<Long> getTaskInstancesWaitingTimeOfUser(final String username, final ProcessDefinitionUUID processUUID, final Date since, final Date until) { Misc.checkArgsNotNull(username, processUUID); if (since.getTime() > until.getTime()) { throw new IllegalArgumentException("The since date is greater than the until date"); } return EnvTool.getAllQueriers(getQueryList()) .getTaskInstancesWaitingTimeOfUser(username, processUUID, since, until); }
@Override public List<Long> getActivityInstancesDuration(final ActivityDefinitionUUID activityUUID, final Date since, final Date until) { Misc.checkArgsNotNull(activityUUID); if (since.getTime() > until.getTime()) { throw new IllegalArgumentException("The since date is greater than the until date"); } return EnvTool.getAllQueriers(getQueryList()).getActivityInstancesDuration(activityUUID, since, until); }
public RuleTypePolicyImpl(RuleType ruleType, PrivilegePolicy policy) { Misc.checkArgsNotNull(ruleType, policy); this.ruleType = ruleType.name(); this.policy = policy.name(); }
protected NamedElementImpl(NamedElement src) { super(src); Misc.checkArgsNotNull(src); this.name = src.getName(); this.label = src.getLabel(); }
@Override public InternalProcessDefinition getLastDeployedProcess( final String processId, final ProcessState processState) { Misc.checkArgsNotNull(processId, processState); // History does not return deployed packages if (processState.equals(ProcessState.ENABLED)) { return null; } return super.getLastDeployedProcess(processId, processState); }
public static void generateBusinessArchiveFile(final File barFile, final ProcessDefinition process, final Map<String, byte[]> resources, final Class< ? >... classes) throws IOException, ClassNotFoundException { Misc.checkArgsNotNull(barFile); byte[] barContent = getBusinessArchiveContent(process, resources, classes); generateBusinessArchiveFile(barFile, barContent); }
@Override public void updateMigrationDate(final ProcessDefinitionUUID processUUID, final Date migrationDate) throws ProcessNotFoundException { Misc.checkArgsNotNull(processUUID); final InternalProcessDefinition process = EnvTool.getAllQueriers().getProcess(processUUID); if (process == null) { throw new ProcessNotFoundException("bai_QDAPII_5", processUUID); } process.setMigrationDate(migrationDate); }