public StringList resolveTemplatePath(ViewParameters viewparams) { return new StringList( "classpath:uk/org/ponder/rsf/templateresolver/support/empty-template"); }
public StringListPOS() { stringlist = new StringList(); } public StringListPOS(StringList stringlist) {
public void processComponent(UIComponent toprocesso) { if (toprocesso instanceof UIForm) { UIForm toprocess = (UIForm) toprocesso; if (toprocess.submittingcontrols == null) { toprocess.submittingcontrols = new StringList(); registerContainer(toprocess, toprocess); } } }
public StringList copy() { StringList togo = new StringList(); togo.addAll(this); return togo; }
/** Push the supplied path segment onto the hidden path base * @param extrapath segment to add */ public void pushNestedPath(String extrapath) { if (extrapath == null) { extrapath = ""; } if (extrapath.length() > 0 && !extrapath.endsWith(".")) { extrapath += '.'; } if (pathstack == null) { pathstack = new StringList(); } pathstack.add(nestedpath); this.nestedpath = nestedpath + extrapath; }
public static StringList collectPrefixes(List inferrers, Map inferrermap) { StringList allprefixes = new StringList(); if (inferrers != null && inferrers.size() > 0) { for (int i = 0; i < inferrers.size(); ++ i) { PrefixHandler evpi = (PrefixHandler) inferrers.get(i); String[] prefixes = evpi.getHandledPrefixes(); allprefixes.append(prefixes); for (int j = 0; j < prefixes.length; ++ j) { inferrermap.put(prefixes[j], evpi); } } } return allprefixes; }
public static StringList collectPrefixes(List inferrers, Map inferrermap) { StringList allprefixes = new StringList(); if (inferrers != null && inferrers.size() > 0) { for (int i = 0; i < inferrers.size(); ++i) { PrefixHandler evpi = (PrefixHandler) inferrers.get(i); String[] prefixes = evpi.getHandledPrefixes(); allprefixes.append(prefixes); for (int j = 0; j < prefixes.length; ++j) { inferrermap.put(prefixes[j], evpi); } } } return allprefixes; }
/** * Construct a StringList from a comma separated list of Strings, trimming * whitespace. * * @param commasep comma separated string * @return a StringList */ public static StringList fromString(String commasep) { String[] strings = commasep.split(","); StringList togo = new StringList(); for (int i = 0; i < strings.length; ++i) { String toadd = strings[i].trim(); // ensure that empty string produces empty list if (toadd.length() != 0 || strings.length > 1) { togo.add(toadd); } } return togo; } }
private void applyNames(String[] beannames) { if (deliverBeans) { setValueRefs(beannames); } else { setValue(new StringList(beannames)); } }
public void setCopyPreservingBeans(String copyPreservingBeans) { StringList specs = StringList.fromString(copyPreservingBeans); if (copyPreservingBeans.indexOf(SPEC_SPLIT_CHAR) != -1) { copyPreservingBeanList = new StringList(); targetPreservingKeyList = new StringList(); for (int i = 0; i < specs.size(); ++ i) { String spec = specs.stringAt(i); int splitpos = spec.indexOf(SPEC_SPLIT_CHAR); String bean = null, key = null; if (splitpos == -1) { bean = key = spec; } else { bean = spec.substring(0, splitpos); key = spec.substring(splitpos + 1); } copyPreservingBeanList.add(bean); targetPreservingKeyList.add(key); } } else { copyPreservingBeanList = specs; } }
/** Disused method */ public List getInvalidatingEntries(String path) { ArrayList togo = new ArrayList(); String[] splitEL = PathUtil.splitPath(path); StringList goup = new StringList(); for (int i = 0; i < splitEL.length; ++ i) { goup.add(splitEL[i]); String upstring = PathUtil.buildPath(goup.toStringArray()); List deps = (List) writemap.get(upstring); if (deps != null) { togo.addAll(deps); } } return togo; } }
static public StringList getListing(File aStartingDir, int mask) { StringList result = new StringList(); File[] filesAndDirs = aStartingDir.listFiles(); if (filesAndDirs == null) { return result; } for (int i = 0; i < filesAndDirs.length; ++ i) { File file = filesAndDirs[i]; if (!file.isFile()) { if ((mask & DIRECTORY_MASK) != 0) { result.add(file.toString()); } StringList deeperList = getListing(file, mask); result.addAll(deeperList); } else { if ((mask & FILE_MASK) != 0) { result.add(file.toString()); } } } //Collections.sort(result); return result; }
/** * Returns a list of bean names which are known to correspond to beans * implementing or derived from the supplied class. RSAC has tried slightly * harder to resolve bean classes than Spring generally does, through walking * chains of factory-methods. * * @param clazz A class or interface class to be searched for. * @return A list of derived bean names. */ public String[] beanNamesForClass(Class clazz) { StringList togo = new StringList(); String[] beanNames = blankcontext.getBeanDefinitionNames(); for (int i = 0; i < beanNames.length; i++) { String beanname = beanNames[i]; RSACBeanInfo rbi = (RSACBeanInfo) rbimap.get(beanname); if (rbi.beanclass != null && !rbi.isabstract && clazz.isAssignableFrom(rbi.beanclass)) { togo.add(beanname); } } return togo.toStringArray(); }
public StringList resolveTemplatePath(ViewParameters viewparams) { StringList togo = new StringList(); ConsumerInfo ci = ciproxy.get(); if (ci.consumertype != null) { String consumerprefix = ci.consumertype + CONSUMERTYPE_SEPARATOR; togo.add(basedir + consumerprefix + viewparams.viewID); } togo.add(basedir + viewparams.viewID); return togo; }
/** Return \n-delimited data from a reader and return as a list of Strings. * The supplied reader WILL be closed! * @param source data source * @return StringList */ public static final StringList readerToStringList(Reader source) { BufferedReader br = new BufferedReader(source); StringList togo = new StringList(); try { while (true) { String line = br.readLine(); if (line == null) break; togo.add(line); } } catch (Exception t) { throw UniversalRuntimeException.accumulate(t, "Error rendering text as stringlist"); } finally { StreamCloseUtil.closeReader(source); } return togo; }
public String[] toPathInfo(ViewParameters toconvert) { StringList togo = new StringList(); ConcreteViewParamsMapInfo mapinfo = vpmim.getMappingInfo(toconvert); boolean nullstarted = false; for (int i = 0; i < mapinfo.trunkpaths.length; ++i) { String trunkpath = mapinfo.trunkpaths[i]; // errors would be checked at parse assembly time String attrval = (String) bma.getFlattenedValue(trunkpath, toconvert, null, null); if (attrval != null) { if (nullstarted) { throw new IllegalArgumentException( "Illegal outgoing URL state - value " + attrval + " at trunk position " + i + " follows previous missing value"); } togo.add(attrval); } else { nullstarted = true; } } return togo.toStringArray(); }
public void invokeRunnable(Runnable towrap) { String flowtoken = flowidholder.getFlowToken(); final StringList completelocks = new StringList(); if (flowtoken != null) { completelocks.add(flowtoken); } completelocks.addAll(scopelocks); if (completelocks.size() == 0) { towrap.run(); return; } Collections.sort(completelocks); // Avoid potential Dedlocks! try { lockUUPP(completelocks, towrap, 0); } finally { lockgetter.returnLock(flowtoken); } }
/** * Renders the entire contents of this message list into a list of localised * messages, using the supplied <code>MessageLocator</code> * @param locator messages * @return localized messages */ public StringList render(MessageLocator locator) { StringList togo = new StringList(); for (int i = 0; i < size(); ++i) { TargettedMessage message = messageAt(i); togo.add(message.message != null? message.message : locator.getMessage(message.messagecodes, message.args)); } return togo; }
/** * Parses a path into an array of decoded EL segments * * @param path path to split * @return array */ public static String[] splitPath(String path) { StringList togo = new StringList(); CharWrap build = new CharWrap(); int index = 0; while (index < path.length()) { index = PathUtil.getPathSegment(build, path, index) + 1; togo.add(build.toString()); build.clear(); } return togo.toStringArray(); }
public StringList restore(WriteableBeanLocator target) { StringList togo = new StringList(); for (int i = 0; i < managers.length; ++i) { String scopename = managers[i].getScopeName(); int restored = strategies[i].restore(target, scopename); if (restored != 0) { String tshkey = strategies[i].getTokenStateHolder().getId(); if (managers[i].getExclusive()) { togo.add(tshkey + "-" + scopename); } } } return togo; }