public void setEnv(File env) { String message = ExceptionManager.getInstance().getFullMessage("bat_BJEE_3"); throw new BuildException(message); } }
public void setEnv(File env) { String message = ExceptionManager.getInstance().getFullMessage("bat_BJEE_3"); throw new BuildException(message); } }
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 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 <E extends Enum<E>> E stringToEnum(final Class<E> c, final String s) { final EnumSet<E> set = EnumSet.allOf(c); for (final E e : set) { if (e.toString().equals(s)) { return e; } } final String message = ExceptionManager.getInstance().getFullMessage("buc_M_11", c.getName(), s, set.toString()); throw new IllegalArgumentException(message); }
/** @see Execution#unlock() */ public void unlock() { if (STATE_ACTIVE.equals(state)) { final String message = ExceptionManager.getInstance().getFullMessage("bp_EI_23"); throw new BonitaRuntimeException(message); } if (LOG.isLoggable(Level.FINE)) { LOG.fine("unlocking " + this); } state = STATE_ACTIVE; }
public InputSource getInputSource() { try { InputStream stream = url.openStream(); InputSource inputSource = new InputSource(stream); inputSource.setSystemId(systemId); return inputSource; } catch (IOException e) { String message = ExceptionManager.getInstance().getFullMessage("bp_UE_2", url); throw new BonitaRuntimeException(message, e); } } }
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 Listener addListener(Listener listener, String eventName) { if (eventName == null) { String message = ExceptionManager.getInstance().getFullMessage("bp_DO_3"); throw new BonitaRuntimeException(message); } List<String> eventNames = new ArrayList<String>(); eventNames.add(eventName); return addListener(listener, eventNames); }
public void close() { if (LOG.isLoggable(Level.FINE)) { LOG.fine("closing " + this); } Environment popped = Environment.popEnvironment(); if (this != popped) { String message = ExceptionManager.getInstance().getFullMessage("bp_BE_1"); throw new BonitaRuntimeException(message); } }
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; }
@Override public boolean commit() throws LoginException { if (this.id == null) { final String message = ExceptionManager.getInstance().getFullMessage("bi_PLM_6"); throw new FailedLoginException(message); } final Set<Principal> principals = this.subject.getPrincipals(); principals.add(new BonitaPrincipal(this.id)); principals.add(new BonitaPrincipalRole(role)); return true; }
@Override public boolean commit() throws LoginException { if (this.id == null) { final String message = ExceptionManager.getInstance().getFullMessage("bi_PLM_6"); throw new FailedLoginException(message); } final Set<Principal> principals = this.subject.getPrincipals(); principals.add(new BonitaPrincipal(this.id)); principals.add(new BonitaPrincipalRole(role)); return true; }
private Object getClassInstance(final Class<?> clazz) { final Object obj = ReflectUtil.newInstance(clazz); if (obj == null) { final String message = ExceptionManager.getInstance().getFullMessage("be_CDL_2", clazz.getName()); throw new BonitaRuntimeException(message); } return obj; }
@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; }
@Override public String getUpdatedBy() { final Update lastUpdate = getLastUpdate(); if (lastUpdate == null) { return null; } if (lastUpdate.getUpdatedBy() != null) { return lastUpdate.getUpdatedBy(); } final String message = ExceptionManager.getInstance().getFullMessage("baoi_TII_2", getUUID()); throw new IllegalStateException(message); }
@Override public String getUpdatedBy() { final Update lastUpdate = getLastUpdate(); if (lastUpdate == null) { return null; } if (lastUpdate.getUpdatedBy() != null) { return lastUpdate.getUpdatedBy(); } final String message = ExceptionManager.getInstance().getFullMessage("baoi_TII_2", getUUID()); throw new IllegalStateException(message); }
public void beginWithOneStartNode() { setIterationId(INITIAL_ITERATION_ID); if (!STATE_CREATED.equals(state)) { final String message = ExceptionManager.getInstance().getFullMessage("bp_EI_1 ", toString(), state); throw new BonitaRuntimeException(message); } state = STATE_ACTIVE; if (node != null) { performAtomicOperation(new ExecuteNode()); } }
@Override public void recordInstanceEnded(final ProcessInstanceUUID instanceUUID, final String loggedInUserId) { Misc.checkArgsNotNull(instanceUUID); final InternalProcessInstance instanceRecord = getProcessInstance(instanceUUID); final String message = ExceptionManager.getInstance().getFullMessage("bsi_DJ_1", instanceUUID); Misc.badStateIfNull(instanceRecord, message); instanceRecord.setInstanceState(InstanceState.FINISHED, loggedInUserId); }
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); } }