List of usage examples for org.springframework.util Assert notNull
public static void notNull(@Nullable Object object, Supplier<String> messageSupplier)
From source file:com.wavemaker.commons.io.ResourcesCollection.java
public ResourcesCollection(Folder source, T... resources) { Assert.notNull(source, "Source must not be null"); Assert.notNull(resources, "Resources must not be null"); this.source = source; this.resources = Arrays.asList(resources); }
From source file:egov.data.ibatis.repository.SimpleSqlMapRepository.java
public SimpleSqlMapRepository(SqlMapClient sqlMapClient) { Assert.notNull(sqlMapClient, "SqlMapClient must not be null!"); this.sqlMapClient = sqlMapClient; }
From source file:org.apache.mina.springrpc.MinaServiceExporter.java
private void prepare() throws Exception { Assert.notNull(acceptor, "acceptor requried"); ReturnAddressAwareRemoteInvocationHandler invocationHandler = new MinaRemoteInvocationHandler(); acceptor.setHandler(new MinaServerHandler(invocationHandler)); acceptor.bind();//from w ww . jav a 2 s .c o m }
From source file:org.pshow.ecm.utils.cache.EhcacheStore.java
public void init() { Assert.hasText(name, "the name of EhCacheMetisStore must have text"); Assert.notNull(cacheManager, "this cacheManager must not be null"); Assert.isTrue(cacheManager.cacheExists(name), "ehcache whose cacheName is " + name + " is not configured"); this.ehcache = cacheManager.getEhcache(name); }
From source file:com.laxser.blitz.web.impl.validation.ParameterBindingResult.java
/** * /* w ww .ja v a 2s .c om*/ * @param inv */ public ParameterBindingResult(Invocation inv) { super(OBJECT_NAME); Assert.notNull(inv, "Target Invocation must not be null"); this.inv = inv; }
From source file:fr.acxio.tools.agia.transform.FieldSetFieldExtractor.java
public void setNames(String[] names) { Assert.notNull(names, "Names must be non-null"); this.names = Arrays.asList(names).toArray(new String[names.length]); }
From source file:org.eclipse.swordfish.core.event.EventServiceImpl.java
public void postEvent(Event swordfishEvent) { LOG.debug("Sending event to topic [" + swordfishEvent.getTopic() + "]"); Assert.notNull(swordfishEvent.getTopic(), "The destination topic must be supplied"); Assert.notNull(eventAdmin, "The EventAdmin service must be supplied"); Dictionary properties = new MapBasedDictionary(swordfishEvent.getProperties()); properties.put(org.osgi.service.event.EventConstants.EVENT, swordfishEvent); org.osgi.service.event.Event event = new org.osgi.service.event.Event(swordfishEvent.getTopic(), properties);//from w ww .j a v a2s . c om eventAdmin.postEvent(event); }
From source file:com.exxonmobile.ace.hybris.core.actions.B2BAcceleratorInformOfOrderApprovalRejection.java
@Override public void executeAction(final B2BApprovalProcessModel process) throws RetryLaterException { try {//from w w w. j a v a 2 s . c om final OrderModel order = process.getOrder(); Assert.notNull(order, String.format("Order of BusinessProcess %s should have be set for accelerator", process)); if (LOG.isDebugEnabled()) { LOG.debug(String.format("Process for accelerator: %s in step %s order: %s user: %s ", process.getCode(), getClass(), order.getUnit(), order.getUser().getUid())); } } catch (final IllegalArgumentException e) { LOG.error(e.getMessage(), e); throw new RuntimeException(e.getMessage(), e); } }
From source file:org.cloudfoundry.tools.io.compiler.ResourceFileObject.java
public ResourceFileObject(File file) { Assert.notNull(file, "File must not be null"); this.file = file; try {//from w w w. j ava2 s.co m this.uri = new URI(ResourceURL.PROTOCOL + ":" + getName()); } catch (URISyntaxException e) { throw new IllegalStateException(e); } }
From source file:com.appdynamics.cloudfoundry.appdservicebroker.catalog.DashboardClient.java
String getSecret() { synchronized (this.monitor) { Assert.notNull(this.secret, "Dashboard Clients must specify a secret"); return this.secret; }// www .ja v a2s .c om }