/** * Sets the file name of the edit resource.<p> * * @param editName the file name of the edit resource */ public void setEditName(String editName) { m_editName = CmsStringUtil.isEmptyOrWhitespaceOnly(editName) ? null : editName; }
/** * Returns if the given container is a nested container.<p> * * @return <code>true</code> if the given container is a nested container */ public boolean isNestedContainer() { return CmsStringUtil.isNotEmptyOrWhitespaceOnly(m_parentInstanceId); }
/** * Replaces null or empty Strings with a String with one space character <code>" "</code>.<p> * * @param value the string to validate * @return the validate string or a String with one space character if the validated string is null or empty */ public String validateEmpty(String value) { if (CmsStringUtil.isNotEmpty(value)) { return value; } return " "; }
/** * Setter for the attribute "noAutoCloseTags" of the <cms:parse> tag.<p> * * Awaits a <code>String</code> that consists of the comma-separated upper case tag names for which this * tag should not correct missing closing tags.<p> * * @param noAutoCloseTagList a <code>String</code> that consists of the comma-separated upper case tag names for which this * tag should not correct missing closing tags */ public void setNoAutoCloseTags(String noAutoCloseTagList) { m_noAutoCloseTags = CmsStringUtil.splitAsList(noAutoCloseTagList, ','); }
/** * Removes all whitespaces from the given legacy rule String.<p> * * @param legacyRules the legacy rule String to substitute * @return the legacy rule String without whitespaces */ protected String substituteLegacyRules(String legacyRules) { return CmsStringUtil.substitute(legacyRules, " ", ""); }
/** * @see org.opencms.loader.I_CmsTemplateContextProvider#initialize(org.opencms.file.CmsObject, java.lang.String) */ public void initialize(CmsObject cms, String config) { m_cms = cms; if (CmsStringUtil.isEmptyOrWhitespaceOnly(config)) { m_params = new HashMap<String, String>(); } else { m_params = CmsStringUtil.splitAsMap(config, ",", "="); } getAllContexts(); }
/** * Checks the ethernet address value and generates a dummy address, if necessary.<p> * */ public void checkEthernetAddress() { // check the ethernet address in order to generate a random address, if not available if (CmsStringUtil.isEmpty(getEthernetAddress())) { setEthernetAddress(CmsStringUtil.getEthernetAddress()); } }
/** * @param resources * the resources to set */ public void setResources(final String resources) { m_resources = CmsStringUtil.splitAsArray(resources, ","); }
/** * Returns the fields parameter value.<p> * * @return the fields parameter value */ public String getFields() { return CmsStringUtil.collectionAsString(m_searchParams.getFields(), ","); }
/** * Returns if the editor is usable as a widget editor for rich text editing.<p> * * @return true if the editor is usable as a widget editor for rich text editing, otherwise false */ public boolean isWidgetEditor() { return CmsStringUtil.isNotEmpty(m_widgetEditor); }
/** * Splits a String into substrings along the provided String delimiter and returns * the result as List of Substrings.<p> * * @param source the String to split * @param delimiter the delimiter to split at * * @return the Array of splitted Substrings */ public static List<String> splitAsList(String source, String delimiter) { return splitAsList(source, delimiter, false); }
/** * Unescapes all <code>&amp;</code>, that is replaces them with a <code>&</code>.<p> * * @param source the String to unescape * @return the unescaped String */ public static String unescapeLink(String source) { if (source == null) { return null; } return CmsStringUtil.substitute(source, "&", "&"); }
/** * @param resources * the resources to set */ public void setResources(final String resources) { m_resources = CmsStringUtil.splitAsArray(resources, ","); }
/** * Default constructor.<p> * * @param currentFolder the current folder */ public CmsSearchWorkplaceBean(String currentFolder) { m_fields = CmsStringUtil.collectionAsString(new CmsSearchParameters().getFields(), ","); m_sortOrder = CmsSearchParameters.SORT_NAMES[0]; m_currentFolder = currentFolder; }
/** * Returns the path of the gallery to display.<p> * * @return the path of the gallery to display */ public String getParamGalleryPath() { if (CmsStringUtil.isEmpty(m_paramGalleryPath)) { m_paramGalleryPath = ""; } return m_paramGalleryPath; }
/** * Sets the attribute.<p> * * @param attribute the attribute to set */ public void setAttribute(String attribute) { if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(attribute)) { m_attribute = attribute; } }
/** * Returns the URI used for template part inclusion.<p> * * @return the URI used for template part inclusion */ public String getTemplateUri() { if (CmsStringUtil.isEmptyOrWhitespaceOnly(m_templateUri)) { m_templateUri = "/"; } return m_templateUri; }
/** * * @see org.opencms.util.I_CmsHtmlNodeVisitor#setConfiguration(java.lang.String) */ public void setConfiguration(String configuration) { if (CmsStringUtil.isNotEmpty(configuration)) { m_configuration = configuration; } }
/** * Splits a String into substrings along the provided char delimiter and returns * the result as a List of Substrings.<p> * * @param source the String to split * @param delimiter the delimiter to split at * * @return the List of splitted Substrings */ public static List<String> splitAsList(String source, char delimiter) { return splitAsList(source, delimiter, false); }