/** * 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 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); }
/** * Parses the given data as an uuid.<p> * * @param data the data to parse * * @return the converted data value */ public static CmsUUID parseUUID(String data) { return new CmsUUID(data); } }
/** * 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); }
public void onUpdate(List<String> updatedItems) { List<CmsUUID> ids = Lists.newArrayList(); for (String item : updatedItems) { ids.add(new CmsUUID(item)); } context.finish(ids); } });
/** * @see org.opencms.ui.shared.rpc.I_CmsSitemapServerRpc#handleChangedProperties(java.lang.String) */ public void handleChangedProperties(String id) { if (m_sitemapTreeController != null) { m_sitemapTreeController.updateNodeForId(new CmsUUID(id)); } }
public void onUpdate(List<String> updatedItems) { List<CmsUUID> updatedIds = Lists.newArrayList(); for (String item : updatedItems) { updatedIds.add(new CmsUUID(item)); } context.finish(updatedIds); } });
/** * 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; }
/** * Creates a clone of this CmsUUID.<p> * * @return a clone of this CmsUUID */ @Override public Object clone() { if (this == NULL_UUID) { return NULL_UUID; } return new CmsUUID((UUID)m_uuid.clone()); }
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; } };
/** * Internal helper method to create an access control entry from a database record.<p> * * @param res resultset of the current query * * @return a new {@link CmsAccessControlEntry} initialized with the values from the current database record * * @throws SQLException if something goes wrong */ protected CmsAccessControlEntry internalCreateAce(ResultSet res) throws SQLException { return internalCreateAce(res, new CmsUUID(res.getString(m_sqlManager.readQuery("C_ACCESS_RESOURCE_ID_0")))); }
/** * Internal helper method to create an access control entry from a database record.<p> * * @param ac the access control * * @return a new {@link CmsAccessControlEntry} initialized with the values from the current database record */ protected CmsAccessControlEntry internalCreateAce(I_CmsDAOAccessControl ac) { return internalCreateAce(ac, new CmsUUID(ac.getResourceId())); }
/** * Returns a constant (name based) UUID, * based on the given name in the OpenCms name space. * * @param name the name to derive the uuid from * @return name based UUID of the given name */ public static CmsUUID getConstantUUID(String name) { return new CmsUUID(UUIDGenerator.getInstance().generateNameBasedUUID(m_opencmsUUID, name)); }
/** * Returns the project id from the current state.<p> * * @return the project id */ private CmsUUID getProjectIdFromState() { String projectIdStr = StateBean.parse(m_currentState).getProjectId(); if (CmsUUID.isValidUUID(projectIdStr)) { return new CmsUUID(projectIdStr); } return null; }
/** * @see org.opencms.workplace.list.A_CmsListDialog#validateParamaters() */ @Override protected void validateParamaters() throws Exception { // test the needed parameters m_paramGroupname = getCms().readGroup(new CmsUUID(getParamGroupid())).getName(); } }
/** * @see org.opencms.workplace.CmsWidgetDialog#validateParamaters() */ @Override protected void validateParamaters() throws Exception { // test the needed parameters getCms().readUser(new CmsUUID(getParamUserid())).getName(); }
/** * @see org.opencms.workplace.list.A_CmsListExplorerDialog#getProject() */ @Override protected CmsProject getProject() { CmsUUID projectId = new CmsUUID(getParamProjectid()); try { return getCms().readProject(projectId); } catch (CmsException e) { return super.getProject(); } }
/** * Unlocks the user.<p> * * @throws Exception if something goes wrong */ public void actionUnlockUser() throws Exception { CmsUUID userId = new CmsUUID(m_paramUserId); CmsObject cms = getCms(); CmsUser user = cms.readUser(userId); OpenCms.getLoginManager().unlockUser(getCms(), user); actionCloseDialog(); }
/** * @see org.opencms.workplace.list.A_CmsListDialog#validateParamaters() */ @Override protected void validateParamaters() throws Exception { try { getCms().readProject(new CmsUUID(getParamProjectid())); } catch (Exception e) { m_paramProjectid = getCms().getRequestContext().getCurrentProject().getUuid().toString(); } } }
/** * Initializes the group object.<p> */ protected void initGroupObject() { try { // edit an existing group, get the group object from db m_group = getCms().readGroup(new CmsUUID(getParamGroupid())); setParentGroup(getCms().readGroup(m_group.getParentId()).getName()); } catch (CmsException e) { // should never happen } }