1 23 24 package org.infoglue.cms.controllers.kernel.impl.simple; 25 26 import java.util.ArrayList ; 27 import java.util.HashMap ; 28 import java.util.List ; 29 import java.util.Map ; 30 31 import org.exolab.castor.jdo.Database; 32 import org.infoglue.cms.entities.structure.SiteNode; 33 import org.infoglue.cms.entities.structure.SiteNodeVO; 34 import org.infoglue.cms.exception.Bug; 35 import org.infoglue.cms.exception.ConstraintException; 36 import org.infoglue.cms.exception.SystemException; 37 import org.infoglue.cms.security.InfoGluePrincipal; 38 39 40 43 44 public class SiteNodeControllerProxy extends SiteNodeController 45 { 46 protected static final Integer NO = new Integer (0); 47 protected static final Integer YES = new Integer (1); 48 protected static final Integer INHERITED = new Integer (2); 49 50 private static List interceptors = new ArrayList (); 51 52 public static SiteNodeControllerProxy getSiteNodeControllerProxy() 53 { 54 return new SiteNodeControllerProxy(); 55 } 56 57 84 108 109 112 113 public SiteNodeVO acCreate(InfoGluePrincipal infogluePrincipal, Integer parentSiteNodeId, Integer siteNodeTypeDefinitionId, Integer repositoryId, SiteNodeVO siteNodeVO) throws ConstraintException, SystemException, Bug, Exception 114 { 115 Map hashMap = new HashMap (); 116 hashMap.put("siteNodeId", parentSiteNodeId); 117 118 intercept(hashMap, "SiteNodeVersion.CreateSiteNode", infogluePrincipal); 119 120 return SiteNodeController.getController().create(parentSiteNodeId, siteNodeTypeDefinitionId, infogluePrincipal, repositoryId, siteNodeVO); 121 } 122 123 126 127 public SiteNode acCreate(InfoGluePrincipal infogluePrincipal, Integer parentSiteNodeId, Integer siteNodeTypeDefinitionId, Integer repositoryId, SiteNodeVO siteNodeVO, Database db) throws ConstraintException, SystemException, Bug, Exception 128 { 129 Map hashMap = new HashMap (); 130 hashMap.put("siteNodeId", parentSiteNodeId); 131 132 intercept(hashMap, "SiteNodeVersion.CreateSiteNode", infogluePrincipal, db); 133 134 return SiteNodeController.getController().create(db, parentSiteNodeId, siteNodeTypeDefinitionId, infogluePrincipal, repositoryId, siteNodeVO); 135 } 136 137 140 151 152 155 166 169 170 public void acDelete(InfoGluePrincipal infogluePrincipal, SiteNodeVO siteNodeVO) throws ConstraintException, SystemException, Bug, Exception 171 { 172 Map hashMap = new HashMap (); 173 hashMap.put("siteNodeId", siteNodeVO.getId()); 174 175 intercept(hashMap, "SiteNodeVersion.DeleteSiteNode", infogluePrincipal); 176 177 delete(siteNodeVO); 178 } 179 180 181 184 185 public void acMoveSiteNode(InfoGluePrincipal infogluePrincipal, SiteNodeVO siteNodeVO, Integer newParentSiteNodeId) throws ConstraintException, SystemException, Bug, Exception 186 { 187 Map hashMap = new HashMap (); 188 hashMap.put("siteNodeId", siteNodeVO.getId()); 189 190 intercept(hashMap, "SiteNodeVersion.MoveSiteNode", infogluePrincipal); 191 192 hashMap = new HashMap (); 193 hashMap.put("siteNodeId", newParentSiteNodeId); 194 195 intercept(hashMap, "SiteNodeVersion.CreateSiteNode", infogluePrincipal); 196 197 moveSiteNode(siteNodeVO, newParentSiteNodeId); 198 } 199 200 201 } 202 | Popular Tags |