/** * Gets the values for the descendants of the path, including the path itself.<p> * * @param path the path * @return the descendant values for the path */ public List<V> getDescendantValues(String path) { return m_tree.getDescendantValues(splitPath(path)); }
/** * Gets the values for the direct children of the given path.<p> * * @param path the path * @return the child values */ public List<V> getChildValues(String path) { return m_tree.getChildValues(splitPath(path)); }
/** * 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 the project search pattern in SQL queries by the pattern _ONLINE_ or _OFFLINE_ depending on the * specified project ID.<p> * * @param projectId the ID of the current project * @param query the SQL query * @return String the SQL query with the table key search pattern replaced */ protected static String replaceProjectPattern(CmsUUID projectId, String query) { // make the statement project dependent String replacePattern = ((projectId == null) || projectId.equals(CmsProject.ONLINE_PROJECT_ID)) ? "_ONLINE_" : "_OFFLINE_"; return CmsStringUtil.substitute(query, QUERY_PROJECT_SEARCH_PATTERN, replacePattern); }
/** * 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, ','); }
/** * Returns the UUID representation for the given session id String.<p> * * @param sessionId the session id String to return the UUID representation for * * @return the UUID representation for the given session id String */ protected CmsUUID getSessionUUID(String sessionId) { return new CmsUUID(sessionId); }
/** * 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, " ", ""); }
/** * @param resources * the resources to set */ public void setResources(final String resources) { m_resources = CmsStringUtil.splitAsArray(resources, ","); }
/** * Returns a formated date and time String from a Date value, * the format being {@link DateFormat#SHORT} and the locale * based on this instance.<p> * * @param date the Date object to format as String * @return the formatted date and time */ public String getDateTime(Date date) { return CmsDateUtil.getDateTime(date, DateFormat.SHORT, m_locale); }
/** * @see java.lang.Object#hashCode() */ @Override public int hashCode() { return m_userId.hashCode(); }
/** * Returns the encoding used for the file. * * @see CmsFileUtil#getEncoding(CmsObject, CmsResource) * * @return the encoding used for the file. */ public String getEncoding() { return CmsFileUtil.getEncoding(m_cms, m_file); }
/** * Validates a value against a regular expression.<p> * * @param value the value * @param regex the regex * * @return <code>true</code> if the value satisfies the validation */ public static boolean validateRegex(String value, String regex) { return CmsStringUtil.validateRegex(value, regex, true); } }
/** * 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; }
/** * Sets the attribute.<p> * * @param attribute the attribute to set */ public void setAttribute(String attribute) { if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(attribute)) { m_attribute = attribute; } }
/** * Returns a constant (name based) UUID for OpenCms, * based on "www.opencms.org" in the dns name space. * * @return name based UUID of OpenCms */ public static CmsUUID getOpenCmsUUID() { return new CmsUUID(m_opencmsUUID); }
/** * * @see java.lang.Object#hashCode() */ @Override public int hashCode() { return m_cause + m_resourceId.hashCode(); }
/** * Returns if the setting value is null or white space only.<p> * * @return <code>true</code> if the setting value is null or white space only */ @Override public boolean getIsEmptyOrWhitespaceOnly() { return CmsStringUtil.isEmptyOrWhitespaceOnly(m_value); }