/** * Returns the String representation of this UUID, same as {@link #toString()}.<p> * * This method is useful if bean like access to the UUID String is required.<p> * * @return the String representation of this UUID */ public String getStringValue() { return toString(); }
/** * 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); }
/** * Returns the Thread id to display in this report.<p> * * @return the Thread id to display in this report */ public String getParamThread() { if ((m_paramThread != null) && (!m_paramThread.equals(CmsUUID.getNullUUID()))) { return m_paramThread.toString(); } else { return null; } }
/** * @see java.lang.Object#hashCode() */ @Override public int hashCode() { if (m_id != null) { return m_id.hashCode(); } return CmsUUID.getNullUUID().hashCode(); }
/** * @see java.lang.Object#hashCode() */ @Override public int hashCode() { return m_structureId.isNullUUID() ? m_resourceId.hashCode() : m_structureId.hashCode(); }
/** * Adds a list of alias import results, and returns the key under which they were stored.<p> * * @param importResults the alias import results * * @return the key under which the alias import results were stored */ public synchronized String addImportResult(List<CmsAliasImportResult> importResults) { String key = (new CmsUUID()).toString(); m_entries.put(key, importResults); return key; }
/** * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object obj) { if (obj instanceof CmsJobBean) { return ((CmsJobBean)obj).m_id.equals(m_id); } return false; }
/** * Enumeration class for the mode parameter in the * {@link CmsDriverManager#readChangedResourcesInsideProject(CmsDbContext, CmsUUID, CmsReadChangedProjectResourceMode)} * method.<p> */ private static class CmsReadChangedProjectResourceMode { /** * Default constructor.<p> */ protected CmsReadChangedProjectResourceMode() { // noop } }
/** * @see org.opencms.db.I_CmsCacheKey#getCacheKeyForUserGroups(java.lang.String, org.opencms.db.CmsDbContext, org.opencms.file.CmsUser) */ public String getCacheKeyForUserGroups(String prefix, CmsDbContext context, CmsUser user) { if (!context.getProjectId().isNullUUID()) { return ""; } StringBuffer cacheBuffer = new StringBuffer(64); cacheBuffer.append(prefix); cacheBuffer.append('_'); cacheBuffer.append(user.getName()); return cacheBuffer.toString(); }
/** * Constructs a new site object without title and id information, * this is to be used for lookup purposes only.<p> * * @param siteRoot root directory of this site in the OpenCms VFS * @param siteMatcher the site matcher for this site */ public CmsSite(String siteRoot, CmsSiteMatcher siteMatcher) { this(siteRoot, CmsUUID.getNullUUID(), siteRoot, siteMatcher, ""); }
/** * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof CmsPublishedResource) { if (m_structureId.isNullUUID()) { return ((CmsPublishedResource)obj).m_resourceId.equals(m_resourceId); } else { return ((CmsPublishedResource)obj).m_structureId.equals(m_structureId); } } return false; }
/** * Checks if this published resource represents a VFS resource.<p> * * If the published resource has no structure id, it is considered to be * no VFS resource.<p> * * @return true if this published resource is a VFS resource * * @deprecated no longer needed */ public boolean isVfsResource() { return !getStructureId().equals(CmsUUID.getNullUUID()); }
/** * Returns the session info key for the bean.<p> * * @return the session info key for the bean */ public String getEditorSessionInfoKey() { return PREFIX_EDITOR_SESSION_INFO + m_editedStructureId.getStringValue(); }
/** * Helper method to compute the uuid for views based on explorer types.<p> * * @param typeName the explorer type name * @return the element view id computed from the type name */ public static CmsUUID getExplorerTypeViewId(String typeName) { return CmsUUID.getConstantUUID("elementview-" + typeName); }
public String substituteMatch(String text, Matcher matcher) { String uuidString = text.substring(matcher.start(), matcher.end()); CmsUUID uuid = new CmsUUID(uuidString); String result = uuidString; if (m_translationsById.containsKey(uuid)) { result = m_translationsById.get(uuid).getStructureId().toString(); } return result; } };
/** * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object obj) { return (obj instanceof CmsBrokenLinkBean) && ((CmsBrokenLinkBean)obj).m_structureId.equals(m_structureId); }
/** * @see org.opencms.db.I_CmsCacheKey#getCacheKeyForUserGroups(java.lang.String, org.opencms.db.CmsDbContext, org.opencms.file.CmsUser) */ public String getCacheKeyForUserGroups(String prefix, CmsDbContext context, CmsUser user) { if (!context.getProjectId().isNullUUID()) { return ""; } StringBuffer cacheBuffer = new StringBuffer(64); cacheBuffer.append(prefix); cacheBuffer.append('_'); cacheBuffer.append(user.getName()); return cacheBuffer.toString(); }
/** * @see java.lang.Object#hashCode() */ @Override public int hashCode() { if (m_id != null) { return m_id.hashCode(); } return CmsUUID.getNullUUID().hashCode(); }
/** * Constructs a new site object without title and id information, * this is to be used for lookup purposes only.<p> * * @param siteRoot root directory of this site in the OpenCms VFS * @param siteMatcher the site matcher for this site */ public CmsSite(String siteRoot, CmsSiteMatcher siteMatcher) { this(siteRoot, CmsUUID.getNullUUID(), siteRoot, siteMatcher, ""); }
/** * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof CmsPublishedResource) { if (m_structureId.isNullUUID()) { return ((CmsPublishedResource)obj).m_resourceId.equals(m_resourceId); } else { return ((CmsPublishedResource)obj).m_structureId.equals(m_structureId); } } return false; }