Returns the uuid id for the given id,
remove this method as soon as possible.<p>

@param context the current cms context
@param id the old project id

@return the new uuid for the given id

@throws CmsException if something goes wrong
332494
public CmsUUID getProjectId(CmsRequestContext context, int id) throws CmsException {

        CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
        CmsUUID result = null;
        try {
            result = m_driverManager.getProjectId(dbc, id);
        } catch (CmsException e) {
            dbc.report(null, e.getMessageContainer(), e);
        } finally {
            dbc.clear();
        }
        return result;
    }
506886
public static void checkId(CmsUUID id, boolean canBeNull) {

        if (canBeNull && (id == null)) {
            return;
        }
        if ((!canBeNull && (id == null)) || id.isNullUUID()) {
            throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_INVALID_UUID_1, id));
        }
    }
276228
public synchronized EvaluatorContext getContext(final String contextId) {
    for (final EvaluatorContext context : this.contextStack) {
      if (context.getId().equals(contextId)) {
        return context;
      }
    }
    throw new RuntimeException("Unknown evaluator context " + contextId);
  }
832228
private CmsUUID getIdFromState(String state) {

        CmsUUID result = null;
        String temp = A_CmsWorkplaceApp.getParamFromState(state, "projectId");
        if (CmsUUID.isValidUUID(temp)) {
            result = new CmsUUID(temp);
        }
        return result;
    }
171935
@Override
	public final void setUUID(UUID id) {
		final UUID oldId = getUUID();
		if ((oldId != null && !oldId.equals(id)) || (oldId == null && id != null)) {
			super.setUUID(oldId);
			fireElementChanged();
		}
	}
1181279
public void removeResourceFromUsersPubList(CmsRequestContext context, Collection<CmsUUID> structureIds)
    throws CmsException {

        CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
        try {
            m_driverManager.removeResourceFromUsersPubList(dbc, context.getCurrentUser().getId(), structureIds);
        } catch (Exception e) {
            dbc.report(
                null,
                Messages.get().container(
                    Messages.ERR_REMOVE_RESOURCE_FROM_PUBLIST_2,
                    context.getCurrentUser().getName(),
                    structureIds),
                e);

        } finally {
            dbc.clear();
        }
    }
348775
public int remove(CmsUUID id) {

        CmsDetailPageInfo info = m_infoById.get(id);
        if (info == null) {
            throw new IllegalArgumentException();
        }
        String type = info.getType();
        List<CmsDetailPageInfo> infos = m_map.get(type);
        int pos = infos.indexOf(info);
        infos.remove(pos);
        m_infoById.remove(id);
        return pos;

    }
234214
public CmsObjectWrapper getCms(SrvSession session, TreeConnection connection) throws CmsException {

        String userName = session.getClientInformation().getUserName();
        userName = CmsJlanUsers.translateUser(userName);
        CmsContextInfo contextInfo = new CmsContextInfo(m_cms.getRequestContext());
        contextInfo.setUserName(userName);
        CmsObject newCms = OpenCms.initCmsObject(m_cms, contextInfo);
        newCms.getRequestContext().setSiteRoot(getRoot());
        newCms.getRequestContext().setCurrentProject(getProject());
        CmsObjectWrapper result = new CmsObjectWrapper(newCms, getWrappers());
        result.setAddByteOrderMark(m_addByteOrderMark);
        result.getRequestContext().setAttribute(CmsXmlContent.AUTO_CORRECTION_ATTRIBUTE, Boolean.TRUE);
        return result;
    }
76812
public CmsUUID getFormatterId() {

        String value = getStringValue(null);
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(value)) {
            String[] parts = value.split(SEPARATOR);
            if (parts.length == 2) {
                return new CmsUUID(parts[1]);
            }
        }
        return null;
    }
465104
@Override
    public String getId(Map<String, Object> context) {
        String id = null;

        if (isMultiplexWithAddress()) {
            String address = (String) context.get(Message.PATH_INFO);
            if (null != address) {
                int afterLastSlashIndex = address.lastIndexOf("/") + 1;
                if (afterLastSlashIndex > 0
                    && afterLastSlashIndex < address.length()) {
                    id = address.substring(afterLastSlashIndex);
                }
            } else {
                getLogger().log(Level.WARNING,
                                new org.apache.cxf.common.i18n.Message("MISSING_PATH_INFO", tc.getLogger()).toString());
            }
        } else {
            return super.getId(context);
        }
        return id;
    }
670671
public User withId(final long id) {
      return new User(id, username, displayName, slug, email, createTimestamp, url, metadata);
   }
119267
public void setResourceId(String resourceId) {

        try {
            if (!m_type.isFolder()) {
                m_resourceId = new CmsUUID(resourceId);
            } else {
                m_resourceId = new CmsUUID();
            }
        } catch (Throwable e) {
            setThrowable(e);
        }
    }
905773
private String getProject(CmsObject cms, CmsFavoriteEntry entry) throws CmsException {

        String result = m_projectLabels.get(entry.getProjectId());
        if (result == null) {
            result = cms.readProject(entry.getProjectId()).getName();
            m_projectLabels.put(entry.getProjectId(), result);
        }
        return result;
    }
504310
public static final String id(String id) {
		if (StringUtils.startsWith(id, PREFIX)) {
			return PREFIX.concat(Utils.noSpaces(Utils.stripAndTrim(id.replaceAll(PREFIX, ""), " "), "-"));
		} else if (id != null) {
			return PREFIX.concat(Utils.noSpaces(Utils.stripAndTrim(id, " "), "-"));
		} else {
			return null;
		}
	}
1030510
public CmsUUID getId() {

        if (m_id != null) {
            return m_id;
        } else if (m_resource != null) {
            return m_resource.getStructureId();
        } else {
            // only in case of the default element view
            return CmsUUID.getNullUUID();
        }
    }
90617
private boolean isNewId(String id) {

        if (id.contains("#")) {
            id = id.substring(0, id.indexOf("#"));
        }
        return !CmsUUID.isValidUUID(id);
    }
113283
public static CmsResource lookupPage(CmsObject cms, String uri) throws CmsException {

        try {
            CmsResource res = cms.readResource(uri);
            return res;
        } catch (CmsVfsResourceNotFoundException e) {
            String detailName = CmsResource.getName(uri).replaceAll("/$", "");
            CmsUUID detailId = cms.readIdForUrlName(detailName);
            if (detailId != null) {
                return cms.readResource(detailId);
            }
            throw new CmsVfsResourceNotFoundException(
                org.opencms.db.generic.Messages.get().container(
                    org.opencms.db.generic.Messages.ERR_READ_RESOURCE_1,
                    uri));
        }
    }