public ParticipantNotFoundException(final String id, final String participantId, final ProcessDefinitionUUID processDefinitionUUID) { super(ExceptionManager.getInstance().getIdMessage(id) + ExceptionManager.getInstance().getMessage("PartNFE1", participantId, processDefinitionUUID)); this.participantId = participantId; this.processUUID = processDefinitionUUID; this.participantUUID = null; }
public UncancellableInstanceException(final String id, final ProcessInstanceUUID processInstanceUUID, final ProcessInstanceUUID parentInstanceUUID, final InstanceState processInstanceState) { super(ExceptionManager.getInstance().getIdMessage(id) + (parentInstanceUUID != null ? ExceptionManager.getInstance().getMessage("UIE1",processInstanceUUID, parentInstanceUUID) : ExceptionManager.getInstance().getMessage("UIE2",processInstanceUUID, processInstanceState))); this.processInstanceUUID = processInstanceUUID; this.parentInstanceUUID = parentInstanceUUID; this.processInstanceState = processInstanceState; }
public GroupNotFoundException(final String id, final String name) { super(ExceptionManager.getInstance().getIdMessage(id) + ExceptionManager.getInstance().getMessage("GNFE", name)); this.name = name; }
public void setEnv(File env) { String message = ExceptionManager.getInstance().getFullMessage("bat_BJEE_3"); throw new BuildException(message); } }
public RoleAlreadyExistsException(final String id, final String name) { super(ExceptionManager.getInstance().getIdMessage(id) + ExceptionManager.getInstance().getMessage("RAEE", name)); this.name = name; }
public RoleNotFoundException(final String id, final String name) { super(ExceptionManager.getInstance().getIdMessage(id) + ExceptionManager.getInstance().getMessage("RNFE", name)); this.name = name; }
public MetadataNotFoundException(final String id, final String name) { super(ExceptionManager.getInstance().getIdMessage(id) + ExceptionManager.getInstance().getMessage("MNFE", name)); this.name = name; }
public DataFieldNotFoundException(final String id, final String dataFieldId, final ProcessDefinitionUUID processDefinitionUUID) { super(ExceptionManager.getInstance().getIdMessage(id) + ExceptionManager.getInstance().getMessage("DFNFE1", dataFieldId, processDefinitionUUID)); this.dataFieldId = dataFieldId; this.processUUID = processDefinitionUUID; this.activityUUID = null; this.dataFieldUUID = null; }
public RoleAlreadyExistsException(final String id, final String name) { super(ExceptionManager.getInstance().getIdMessage(id) + ExceptionManager.getInstance().getMessage("RAEE", name)); this.name = name; }
public ProcessNotFoundException(final String id, final ProcessDefinitionUUID processUUID) { super(ExceptionManager.getInstance().getIdMessage(id) + ExceptionManager.getInstance().getMessage("PNFE3", processUUID)); this.processUUID = processUUID; this.processId = null; this.version = null; }
public UnAuthorizedUserException(String id, String msg, ActivityInstanceUUID taskUUID, String userId) { super(ExceptionManager.getInstance().getIdMessage(id) + ExceptionManager.getInstance().getMessage("UAUE3", userId, msg, taskUUID)); this.taskUUID = taskUUID; this.userId = userId; }
public static Map<String, byte[]> getResources(final Class<?>... classes) throws IOException { if (classes == null || classes.length == 0) { final String message = ExceptionManager.getInstance().getFullMessage("buc_M_13"); throw new IOException(message); } final Map<String, byte[]> resources = new HashMap<String, byte[]>(); for (final Class<?> clazz : classes) { resources.put(clazz.getName().replace(".", "/") + ".class", ClassDataTool.getClassData(clazz)); } return resources; }
public static URL getResource(ClassLoader classLoader, String resource) { classLoader = resolveClassLoader(classLoader); try { if (LOG.isLoggable(Level.FINE)) { LOG.fine("getting resource " + resource); } return classLoader.getResource(resource); } catch (Exception e) { String message = ExceptionManager.getInstance().getFullMessage("bp_RU_4", resource); throw new BonitaRuntimeException(message, e); } }
public MultiInstantiatorDescriptor(final int joinNumber, final List<Object> variableValues) { Misc.checkArgsNotNull(variableValues); String message = ExceptionManager.getInstance().getFullMessage("ba_MID_1"); Misc.badStateIfTrue(joinNumber <= 0, message); message = ExceptionManager.getInstance().getFullMessage("ba_MID_2"); Misc.badStateIfTrue(joinNumber > variableValues.size(), message); this.joinNumber = joinNumber; this.variableValues = variableValues; }
protected <T extends Enum<T> > T getEnumValue(Class< T > enumType, String valueAsString, T defaultValue) { if (valueAsString == null) { return defaultValue; } try { return Misc.stringToEnum(enumType, valueAsString); } catch (IllegalArgumentException e) { String message = ExceptionManager.getInstance().getMessage( "bpx_EB_1", valueAsString, enumType.getName()); throw new BonitaRuntimeException(message, e); } }
protected <T extends Enum<T> > T getEnumValue(Class< T > enumType, String valueAsString, T defaultValue) { if (valueAsString == null) { return defaultValue; } try { return Misc.stringToEnum(enumType, valueAsString); } catch (IllegalArgumentException e) { String message = ExceptionManager.getInstance().getMessage( "bpx_EB_1", valueAsString, enumType.getName()); throw new BonitaRuntimeException(message, e); } }
@Override public InputStream openStream() { final InputStream stream = ReflectUtil.getResourceAsStream(classLoader, resource); if (stream == null) { final String message = ExceptionManager.getInstance().getFullMessage("bp_RSS_2"); throw new BonitaRuntimeException(message); } return stream; }
public static IllegalTaskStateException build(String id, Throwable e) { if (!(e instanceof IllegalTaskStateException)) { ExceptionManager manager = ExceptionManager.getInstance(); String message = manager.getIdMessage(id) + manager.getMessage("ITSE2"); throw new BonitaInternalException(message, e); } return new IllegalTaskStateException((IllegalTaskStateException)e); }
public static InstanceNotFoundException build(final String id, final Throwable e) { if (!(e instanceof InstanceNotFoundException)) { final ExceptionManager manager = ExceptionManager.getInstance(); final String message = manager.getIdMessage(id) + manager.getMessage("INFE2"); throw new BonitaInternalException(message, e); } return new InstanceNotFoundException((InstanceNotFoundException) e); }
public String selectUser(QueryAPIAccessor accessor, ActivityInstance activityInstance, Set<String> candidates) throws Exception { final QueryRuntimeAPI queryRuntimeAPI = accessor.getQueryRuntimeAPI(AccessorUtil.QUERYLIST_JOURNAL_KEY); try { return (String) queryRuntimeAPI.getVariable(activityInstance.getUUID(), variableId); } catch (BonitaException e) { String message = ExceptionManager.getInstance().getFullMessage("ba_VPA_1", variableId); throw new BonitaRuntimeException(message, e); } }