/** * The name of a file, created by the executable, that should be considered as its output. * If no outFile is set, the standard output (stdout) of the executable will be used instead. */ public void setOutFile(String outFile) { StringHelper.notEmpty(outFile, "outFile"); this.outFile = outFile; }
/** * Sets the executable to be executed. The executable must not be empty or * <code>null</code>. */ public void setExecutable(String executable) { StringHelper.notEmpty(executable, "executable"); this.executable = executable; }
/** * Creates an aggregation repository * * @param repositoryName the repository name */ public LevelDBAggregationRepository(String repositoryName) { StringHelper.notEmpty(repositoryName, "repositoryName"); this.repositoryName = repositoryName; }
public void setBasePath(final String basePath) { this.basePath = notEmpty(basePath, "basePath"); }
public void setContentTypeFormat(String contentTypeFormat) { StringHelper.notEmpty(contentTypeFormat, "ThriftDataFormat contentTypeFormat"); this.contentTypeFormat = contentTypeFormat; }
/** * Creates an aggregation repository using a new {@link LevelDBFile} * that persists using the provided file. * * @param repositoryName the repository name * @param persistentFileName the persistent store filename */ public LevelDBAggregationRepository(String repositoryName, String persistentFileName) { StringHelper.notEmpty(repositoryName, "repositoryName"); StringHelper.notEmpty(persistentFileName, "persistentFileName"); this.repositoryName = repositoryName; this.persistentFileName = persistentFileName; }
public void setComponentName(final String componentName) { this.componentName = notEmpty(componentName, "componentName"); }
public void setBasePath(final String basePath) { this.basePath = notEmpty(basePath, "basePath"); }
public void setOperationId(final String operationId) { this.operationId = notEmpty(operationId, "operationId"); }
static String isHostParam(final String given) { final String hostUri = StringHelper.notEmpty(given, "host"); final Matcher matcher = HOST_PATTERN.matcher(given); if (!matcher.matches()) { throw new IllegalArgumentException( "host must be an apsolute URI (e.g. http://api.example.com), given: `" + hostUri + "`"); } return hostUri; } }
/** * Creates an aggregation repository using the provided {@link LevelDBFile}. * * @param repositoryName the repository name * @param levelDBFile the leveldb file to use as persistent store */ public LevelDBAggregationRepository(String repositoryName, LevelDBFile levelDBFile) { StringHelper.notEmpty(repositoryName, "repositoryName"); ObjectHelper.notNull(levelDBFile, "levelDBFile"); this.levelDBFile = levelDBFile; this.repositoryName = repositoryName; }
public DelegatingDataSource(final String name, final DataSource delegate) { this.name = StringHelper.notEmpty(name, "name"); this.delegate = ObjectHelper.notNull(delegate, "DataSource"); }
@Override protected void doStart() throws Exception { // validate StringHelper.notEmpty(lockMapName, "lockMapName", this); StringHelper.notEmpty(lockKey, "lockKey", this); StringHelper.notEmpty(lockValue, "lockValue", this); executorService = getCamelContext().getExecutorServiceManager().newSingleThreadExecutor(this, "HazelcastRoutePolicy"); locks = instance.getMap(lockMapName); future = executorService.submit(this::acquireLeadership); super.doStart(); }
@Override public <T> T lookupByNameAndType(String name, Class<T> type) { notEmpty(name, "name"); notNull(type, "type"); logger.trace("Looking up bean with name [{}] of type [{}]", name, type); return getReferenceByName(manager, name, type).orElse(null); }
@Override public Object lookupByName(String name) { notEmpty(name, "name"); logger.trace("Looking up bean with name [{}]", name); // Work-around for WELD-2089 if ("properties".equals(name) && findByTypeWithName(PropertiesComponent.class).containsKey("properties")) { return getReferenceByName(manager, name, PropertiesComponent.class).orElse(null); } return getReferenceByName(manager, name, Object.class).orElse(null); }
private synchronized void initEncryptor() { if (encryptor == null) { StringHelper.notEmpty("password", password); StandardPBEStringEncryptor pbeStringEncryptor = new StandardPBEStringEncryptor(); pbeStringEncryptor.setPassword(password); if (algorithm != null) { pbeStringEncryptor.setAlgorithm(algorithm); log.debug(format("Initialized encryptor using %s algorithm and provided password", algorithm)); } else { log.debug("Initialized encryptor using default algorithm and provided password"); } encryptor = pbeStringEncryptor; } }
public RestSwaggerEndpoint(final String uri, final String remaining, final RestSwaggerComponent component, final Map<String, Object> parameters) { super(notEmpty(uri, "uri"), notNull(component, "component")); this.parameters = parameters; assignedComponentName = before(uri, ":"); final URI componentSpecificationUri = component.getSpecificationUri(); specificationUri = before(remaining, "#", StringHelper::trimToNull).map(URI::create) .orElse(ofNullable(componentSpecificationUri).orElse(RestSwaggerComponent.DEFAULT_SPECIFICATION_URI)); operationId = ofNullable(after(remaining, "#")).orElse(remaining); setExchangePattern(ExchangePattern.InOut); }