/** * @param id unique identifier for the target object * @param target the object to be ordered; this may also be null (in which case the id represents a placeholder) */ public Orderable(String id, T target, String... constraints) { assert InternalUtils.isNonBlank(id); this.id = id; this.target = target; this.constraints = constraints; }
public DecoratorDefImpl(Method decoratorMethod, String[] patterns, String[] constraints, PlasticProxyFactory proxyFactory, String decoratorId, Class serviceInterface, Set<Class> markers) { super(decoratorMethod, patterns, constraints, serviceInterface, markers, proxyFactory); assert InternalUtils.isNonBlank(decoratorId); this.decoratorId = decoratorId; }
public AdvisorDefImpl(Method method, String[] patterns, String[] constraints, PlasticProxyFactory proxyFactory, String advisorId, Class serviceInterface, Set<Class> markers) { super(method, patterns, constraints, serviceInterface, markers, proxyFactory); assert InternalUtils.isNonBlank(advisorId); this.advisorId = advisorId; }
public PersistedEntity(String entityName, Serializable id) { assert InternalUtils.isNonBlank(entityName); assert id != null; this.entityName = entityName; this.id = id; }
private MethodSignature(Method method, Class returnType, String name, Class[] parameterTypes, Class[] exceptionTypes) { this.method = method; assert returnType != null; this.returnType = returnType; assert InternalUtils.isNonBlank(name); this.name = name; // Can be null! this.parameterTypes = parameterTypes; this.exceptionTypes = exceptionTypes; }
public void setMeta(String key, String value) { assert InternalUtils.isNonBlank(key); assert InternalUtils.isNonBlank(value); if (metaData == null) metaData = CollectionFactory.newCaseInsensitiveMap(); // TODO: Error if duplicate? metaData.put(key, value); }
@Override public ServiceBindingOptions scope(String scope) { assert InternalUtils.isNonBlank(scope); lock.check(); this.scope = scope; return this; }
public Link addParameter(String parameterName, String value) { assert InternalUtils.isNonBlank(parameterName); if (parameters == null) { parameters = new TreeMap<String, List<String>>(); } InternalUtils.addToMapList(parameters, parameterName, value == null ? "" : value); return this; }
public void storeRenderVariable(String name, Object value) { assert InternalUtils.isNonBlank(name); assert value != null; Map<String, Object> renderVariables = getRenderVariables(true); renderVariables.put(name, value); }
public PrintWriter getPrintWriter(String contentType) throws IOException { assert InternalUtils.isNonBlank(contentType); OutputStream os = getOutputStream(contentType); Writer w = new OutputStreamWriter(os, response.getCharacterEncoding()); return new PrintWriter(new BufferedWriter(w)); }
@Override public ServiceBindingOptions withId(String id) { assert InternalUtils.isNonBlank(id); lock.check(); serviceId = id; return this; }
@Override public final Resource withExtension(String extension) { assert InternalUtils.isNonBlank(extension); int dotx = path.lastIndexOf('.'); if (dotx < 0) return createResource(path + "." + extension); return createResource(path.substring(0, dotx + 1) + extension); }
@Override public void override(String id, T object, String... constraints) { assert InternalUtils.isNonBlank(id); T coerced = object == null ? null : typeCoercer.coerce(object, expectedType); OrderedConfigurationOverride<T> existing = overrides.get(id); if (existing != null) throw new IllegalArgumentException(String.format("Contribution '%s' has already been overridden (by %s).", id, existing.getContribDef())); overrides.put(id, new OrderedConfigurationOverride<T>(orderer, id, coerced, constraints, contribDef)); }
@Override public MethodAdvice createAdvice(String description) { assert InternalUtils.isNonBlank(description); if (description.contains("%")) { return new FormattedAdvice(description); } return new SimpleAdvice(description); } }
public void handle(ComponentEventRequestParameters parameters, ComponentEventRequestHandler handler) throws IOException { String formClientId = request.getParameter(RequestConstants.FORM_CLIENTID_PARAMETER); String formComponentId = request.getParameter(RequestConstants.FORM_COMPONENTID_PARAMETER); if (InternalUtils.isNonBlank(formClientId) && InternalUtils.isNonBlank(formComponentId)) ajaxFormUpdateController.initializeForForm(formComponentId, formClientId); handler.handle(parameters); } }
public void updateSort(String columnId) { assert InternalUtils.isNonBlank(columnId); if (columnId.equals(sortColumnId)) { setSortAscending(!getSortAscending()); return; } sortColumnId = columnId; setSortAscending(true); }
public void updateSort(String columnId) { assert InternalUtils.isNonBlank(columnId); if (columnId.equals(paginationModel.getSortColumnId())) { setSortAscending(!getSortAscending()); return; } paginationModel.setSortColumnId(columnId); setSortAscending(true); }
public AjaxResponseRenderer addRender(String clientId, Object renderer) { assert InternalUtils.isNonBlank(clientId); assert renderer != null; RenderCommand command = typeCoercer.coerce(renderer, RenderCommand.class); addFilter(new SingleZonePartialRendererFilter(clientId, command, queue, ajaxFormUpdateController)); return this; }
public String getClientId() { if (InternalUtils.isBlank(clientId)) clientId = (InternalUtils.isNonBlank(resources.getInformalParameter("id", String.class))) ? resources .getInformalParameter("id", String.class) : javaScriptSupport.allocateClientId(resources); return clientId; }
public String getClientId() { if(InternalUtils.isBlank(clientId)) clientId = (InternalUtils.isNonBlank(resources.getInformalParameter("id", String.class))) ? resources.getInformalParameter("id", String.class) : javaScriptSupport.allocateClientId(resources); return clientId; }