will(new CustomAction("returns first arg") { @Override public Object invoke(Invocation invocation) throws Throwable {
/** * Using this as a data wrapper only * @param data any data to wrap this in * @param entityProperties a set of properties to return along with the entity information, * this may be presented and used for filtering, */ public EntityData(Object data, Map<String, Object> entityProperties) { setData(data); setEntityProperties(entityProperties); this.dataOnly = true; }
public TemplateMap[] defineURLMappings() { return new TemplateMap[] { new TemplateMap(templates[0], templates[1]), new TemplateMap(templates[2], templates[3]), new TemplateMap(templates[4], templates[5]) }; }
/** * @return a copy of this object */ public CustomAction copy() { return copy(this); }
public void setNestedPrefixes(String[] nestedPrefixes) { if (nestedPrefixes != null && nestedPrefixes.length > 0) { for (int i = 0; i < nestedPrefixes.length; i++) { addNestedPrefix(nestedPrefixes[i]); } } else { this.nestedPrefixes = null; } }
/** * Add results to the total results, * this will not allow adding results beyond the totalItemsMatched (max) number * * @param steepleItem the result to add * @return true if the item was added OR false if it was null or the max number is already added */ public boolean addResult(SearchContent content) { boolean added = false; if (content != null) { SearchResult sr = new SearchResult(content); added = addResult(sr); } return added; }
/** * Use this for controllable template matches only * @param template */ public URLRedirect(String template) { setTemplate(template); controllable = true; }
public void resetSearchIndexes(String context) { if (searchProvider != null) { searchProvider.resetSearchIndexes(context); } }
/** * @return a copy of this object */ public URLRedirect copy() { return copy(this); }
/** * @return the ending number for these results * (this is the true ending number and also the ending index based on the items returned * and not only based on the max items to return) */ public int getEndNum() { return startIndex + getResultsNum(); // or (startIndex + 1) + (resultsNum - 1) }
public boolean inRequest() { boolean in = false; if (requestGetter.getRequest() != null) { in = true; } return in; }
public void setEntityViewKeys(String[] entityViewKeys) { if (entityViewKeys != null && entityViewKeys.length > 0) { for (int i = 0; i < entityViewKeys.length; i++) { addEntityViewKeys(entityViewKeys[i]); } } else { this.entityAccessViews = null; } }
/** * @return the ending index based on the start index and the max items to return * (not based on the actual items in the results), return the max int if the max is 0 */ public int getEndIndex() { int end; int max = getMaxItemsToReturn(); if (max <= 0) { end = Integer.MAX_VALUE; } else { end = startIndex + getMaxItemsToReturn(); } return end; }
public CustomAction[] defineActions() { return new CustomAction[] { new CustomAction("double", EntityView.VIEW_SHOW), // return the object with the number doubled new CustomAction("xxx", EntityView.VIEW_EDIT), // change all text fields to 3 x's new CustomAction("clear", EntityView.VIEW_LIST) // remove all items }; }
public TemplateMap[] defineURLMappings() { return new TemplateMap[] { new TemplateMap("/{prefix}/context/{siteId}", "{prefix}{dot-extension}") // all assignments in a site }; }
public CustomAction[] defineActions() { return new CustomAction[] { new CustomAction("double", EntityView.VIEW_SHOW, "doubleUp"), // return the object with the number doubled new CustomAction("xxx", EntityView.VIEW_EDIT, "xxxChange"), // change all text fields to 3 x's new CustomAction("clear", EntityView.VIEW_LIST, "clearAll") // remove all items }; }
public TemplateMap[] defineURLMappings() { return new TemplateMap[] { new TemplateMap("/{prefix}/context/{siteId}", "{prefix}{dot-extension}") // all assignments in a site }; }
public CustomAction[] defineActions() { return new CustomAction[] { new CustomAction("double", EntityView.VIEW_SHOW), // return the object with the number doubled new CustomAction("xxx", EntityView.VIEW_EDIT), // change all text fields to 3 x's new CustomAction("clear", EntityView.VIEW_LIST) // remove all items }; }
public TemplateMap[] defineURLMappings() { return new TemplateMap[] { new TemplateMap(templates[0], templates[1]), new TemplateMap(templates[2], templates[3]), new TemplateMap(templates[4], templates[5]) }; }
public CustomAction[] defineActions() { return new CustomAction[] { new CustomAction("double", EntityView.VIEW_SHOW, "doubleUp"), // return the object with the number doubled new CustomAction("xxx", EntityView.VIEW_EDIT, "xxxChange"), // change all text fields to 3 x's new CustomAction("clear", EntityView.VIEW_LIST, "clearAll") // remove all items }; }