|
From: Alexander G. <gaf...@us...> - 2006-01-18 18:23:52
|
Update of /cvsroot/cobricks/cobricks2/src/org/cobricks/portal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23199/src/org/cobricks/portal Modified Files: PortalManagerImpl.java Log Message: Versioned attribute added Index: PortalManagerImpl.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/portal/PortalManagerImpl.java,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- PortalManagerImpl.java 18 Jan 2006 16:22:43 -0000 1.71 +++ PortalManagerImpl.java 18 Jan 2006 18:23:44 -0000 1.72 @@ -53,6 +53,9 @@ import org.cobricks.core.ComponentManagerAdaptor; import org.cobricks.core.ComponentManagerInterface; import org.cobricks.core.ComponentPresenterInterface; +import org.cobricks.core.Ontology; +import org.cobricks.core.OntologyClass; +import org.cobricks.core.OntologyClassAttr; import org.cobricks.core.db.DBAccess; import org.cobricks.core.util.DateUtil; import org.cobricks.core.util.LogUtil; @@ -391,9 +394,19 @@ String pageLanguage = null; String itemclass = null; + + Ontology ontology = null; + OntologyClass ontologyClass = null; + OntologyClassAttr ontologyAttr = null; + try { itemclass = (String)page.getAttribute("itemclass"); + //Check if the content is versioend + ontology = itemManager.getOntology(); + ontologyClass= ontology.getClass(itemclass); + ontologyAttr = ontologyClass.getAttribute("content"); + //Get verseionid of page versionid = Integer.valueOf( portalRequest.getRequestParameter("versionid")); @@ -414,8 +427,7 @@ Map pc = null; - - if(itemclass != null && itemclass.equals("wikipage")) { + if((ontologyAttr != null) && ontologyAttr.isVersioned()) { pc = new HashMap(); String content = null; if (versionid != null) { |