/** * Fills details of the project into the given item. <p> * * @param item the list item to fill * * @param detailId the id for the detail to fill * */ private void fillDetailProject(CmsListItem item, String detailId) { StringBuffer html = new StringBuffer(); // search /read for the corresponding history project: it's tag id transmitted from getListItems() // in a hidden column Object tagIdObj = item.get(LIST_COLUMN_PUBLISH_TAG); if (tagIdObj != null) { // it is null if the offline version with changes is shown here: now history project available then int tagId = ((Integer)tagIdObj).intValue(); try { CmsHistoryProject project = getCms().readHistoryProject(tagId); // output of project info html.append(project.getName()).append("<br/>").append(project.getDescription()); } catch (CmsException cmse) { html.append(cmse.getMessageContainer().key(this.getLocale())); } } item.set(detailId, html.toString()); } }
/** * Fills details of the project into the given item. <p> * * @param item the list item to fill * * @param detailId the id for the detail to fill * */ private void fillDetailProject(CmsListItem item, String detailId) { StringBuffer html = new StringBuffer(); // search /read for the corresponding history project: it's tag id transmitted from getListItems() // in a hidden column Object tagIdObj = item.get(LIST_COLUMN_PUBLISH_TAG); if (tagIdObj != null) { // it is null if the offline version with changes is shown here: now history project available then int tagId = ((Integer)tagIdObj).intValue(); try { CmsHistoryProject project = getCms().readHistoryProject(tagId); // output of project info html.append(project.getName()).append("<br/>").append(project.getDescription()); } catch (CmsException cmse) { html.append(cmse.getMessageContainer().key(getLocale())); } } item.set(detailId, html.toString()); } }
/** * Returns the project name that locked the current resource's.<p> * * @return the the project name that locked the current resource's */ public String getLockedInProjectName() { try { CmsUUID pId = getLockedInProjectId(); if ((pId == null) || pId.isNullUUID()) { // the resource is unlocked and unchanged return ""; } try { return getCurrentOuRelativeName(getCms().readProject(pId).getName()); } catch (CmsDbEntryNotFoundException e) { return getCurrentOuRelativeName(getCms().readHistoryProject(pId).getName()); } } catch (Throwable e) { LOG.error(e.getLocalizedMessage(), e); return ""; } }
/** * Returns the project name that locked the current resource's.<p> * * @return the the project name that locked the current resource's */ public String getLockedInProjectName() { try { CmsUUID pId = getLockedInProjectId(); if ((pId == null) || pId.isNullUUID()) { // the resource is unlocked and unchanged return ""; } try { return getCurrentOuRelativeName(getCms().readProject(pId).getName()); } catch (CmsDbEntryNotFoundException e) { return getCurrentOuRelativeName(getCms().readHistoryProject(pId).getName()); } } catch (Throwable e) { LOG.error(e.getLocalizedMessage(), e); return ""; } }
CmsHistoryProject project = (CmsHistoryProject)itProjects.next(); CmsListItem item = getList().newItem(new Integer(project.getPublishTag()).toString()); item.set(LIST_COLUMN_NAME, project.getName()); item.set(LIST_COLUMN_DESCRIPTION, project.getDescription()); try {
/** * @see org.opencms.file.CmsProject#clone() */ @Override public Object clone() { return new CmsHistoryProject( m_publishTag, getUuid(), getName(), getDescription(), getOwnerId(), getGroupId(), getManagerGroupId(), getDateCreated(), getType(), m_datePublished, m_userPublished, m_projectResources); }
/** * @see org.opencms.file.CmsProject#clone() */ @Override public Object clone() { return new CmsHistoryProject( m_publishTag, getUuid(), getName(), getDescription(), getOwnerId(), getGroupId(), getManagerGroupId(), getDateCreated(), getType(), m_datePublished, m_userPublished, m_projectResources); }