@SuppressWarnings("unchecked") @Override public BusinessServicesSerializer<?> getSerializerOfType(String type) { BusinessServicesSerializer<?> serializer = serializers.get(type); if (serializer == null) { throw new GeneralBusinessException("Serializer of type {} not found.", type); } return serializer; }
public UserProfileException(String messagePattern, Object... args) { super(MessageFormatter.arrayFormat(messagePattern, args).getMessage()); }
@Override public SearchHandler resolve(SearchViewConfiguration searchConfiguration) { SearchHandler handler = builderViewHandlers.get(searchConfiguration); if (handler == null){ throw new GeneralBusinessException("Unknown search type {}", searchConfiguration); } return handler; }
public UserProfileException(Throwable cause, String messagePattern, Object... args) { super(MessageFormatter.arrayFormat(messagePattern, args).getMessage(), cause); }
@Override public InterlocutorSendingPolicy getSendingPolicyForInterlocutorType(InterlocutorType interType) { InterlocutorSendingPolicy sendingPolicy = sendingPolicies.get(interType); if (sendingPolicy == null) { throw new GeneralBusinessException("Sending policy for interlocutor of type {} not found.", interType); } return sendingPolicy; }
public ServiceException(Throwable cause, String messagePattern, Object... args) { super(MessageFormatter.arrayFormat(messagePattern, args).getMessage(), cause); }
@SuppressWarnings("unchecked") @Override public PortalSerializer<?> getSerializerOfType(String type) { PortalSerializer<?> serializer = serializers.get(type); if (serializer == null) { throw new GeneralBusinessException("Serializer of type {} not found.", type); } return serializer; }
public ServiceException(String messagePattern, Object... args) { super(MessageFormatter.arrayFormat(messagePattern, args).getMessage()); }
private ProjectCategoryPair getPairByCategoryId(final String portalCategoryId) { ProjectCategoryPair projectCategoryPair = categoryMap.get(portalCategoryId); if (projectCategoryPair == null) { throw new GeneralBusinessException("Category {} does not exists in configuration", portalCategoryId); } return projectCategoryPair; }
public OpenUrlException(String messagePattern, Object... args) { super(MessageFormatter.arrayFormat(messagePattern, args).getMessage()); }
@Override public Class<?> getObjectType() { if (beanClass != null) { return beanClass; } Class<?> resolvedClass; try { resolvedClass = ClassUtils.forName(className, beanClassLoader); beanClass = resolvedClass; } catch (ClassNotFoundException e) { throw new GeneralBusinessException(e); } return resolvedClass; }
@Override public Object transform(ServiceDeployment serviceDeployment) { StringWriter sw = new StringWriter(); try { objectMapper.writeValue(sw, serviceDeployment); } catch (IOException e) { throw new GeneralBusinessException(e); } return sw.toString(); }
public Properties getProperties() { try { return mergeProperties(); } catch (IOException e) { throw new GeneralBusinessException(e); } }
public void addProperties(Properties properties) { try { loadProperties(properties); } catch (IOException e) { throw new GeneralBusinessException(e); } } }
private ReferenceParser getParser(String referenceText, final String format, final String filename) { for (ReferenceParser parser : parsers) { if (parser.isAplicable(referenceText, format, filename)) { return parser; } } throw new GeneralBusinessException("should never be here"); }
private void logError(final PagedListResponse<YaddaObjectID> response) { throw new GeneralBusinessException("Error while retrieving data from Yadda: {}", response.getError()); }
@Override public synchronized void removeService(final String serviceId) { ServiceDeployment removed = currentConfigurationMap.remove(serviceId); if (removed == null) { throw new GeneralBusinessException("Unable to remove service [{}]", serviceId); } saveConfiguration(); }
private ObservationView getObservationView(ObservationObjectType objectType) { ObservationView observationView = ObservationView.getObservationView(objectType); if (observationView == null) { throw new GeneralBusinessException("Cannot determine observation view for observation object type '{}'", objectType.name()); } return observationView; }
private ProcessStats prepareStatsFromJobExecution(final Long jobInstanceId) { final JobExecution jobExecution = processDataStorage.getJobExecution(jobInstanceId); if (jobExecution == null) { throw new GeneralBusinessException("Process [" + jobInstanceId + "] not found!"); } return getProcessStats(jobExecution); }
/** * @return value or null if not present */ private String getConditionValue(Version version, Map<String, String[]> params, String fieldName) { switch (version) { case v0_1: return getOneValue(params, fieldName); case v1_0: return getOneValue(params, fetchParameterName(fieldName)); } throw new GeneralBusinessException("OpenUrl version not supported"); }