/** * 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()); } }
CmsListItem item = getList().newItem(new Integer(project.getPublishTag()).toString()); item.set(LIST_COLUMN_NAME, project.getName()); item.set(LIST_COLUMN_DESCRIPTION, project.getDescription()); try { item.set(LIST_COLUMN_OWNER, project.getOwnerName(getCms()));
/** * @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); }
item.getItemProperty(CmsProjectsTable.PROP_ID).setValue(project.getUuid()); item.getItemProperty(CmsProjectsTable.PROP_NAME).setValue(project.getSimpleName()); item.getItemProperty(CmsProjectsTable.PROP_DESCRIPTION).setValue(project.getDescription()); item.getItemProperty(PROP_PUBLISH_DATE).setValue(new Date(project.getPublishingDate())); item.getItemProperty(PROP_PUBLISH_USER).setValue(project.getPublishedByName(cms));