Package org.infoglue.cms.entities.management

Examples of org.infoglue.cms.entities.management.InterceptionPoint


   * @throws SystemException
   */
 
  public InterceptionPointVO create(InterceptionPointVO interceptionPointVO, Database db) throws SystemException, Exception
  {
    InterceptionPoint interceptionPoint = new InterceptionPointImpl();
    interceptionPoint.setValueObject(interceptionPointVO);
   
    db.create(interceptionPoint);
         
    return interceptionPoint.getValueObject();
  }    
View Full Code Here


      beginTransaction(db);
     
      ConstraintExceptionBuffer ceb = interceptionPointVO.validate();
      ceb.throwIfNotEmpty();
     
      InterceptionPoint interceptionPoint = this.getInterceptionPointWithId(interceptionPointVO.getInterceptionPointId(), db);

      interceptionPoint.setValueObject(interceptionPointVO);
     
      Collection interceptors = interceptionPoint.getInterceptors();
      Iterator interceptorsIterator = interceptors.iterator();
      while(interceptorsIterator.hasNext())
      {
        Interceptor interceptor = (Interceptor)interceptorsIterator.next();
        interceptor.getInterceptionPoints().remove(interceptionPoint);
      }
     
      interceptionPoint.getInterceptors().clear();
       
        if(values != null)
        {
        for(int i=0; i<values.length; i++)
        {
          String interceptorId = values[i];
          Interceptor interceptor = InterceptorController.getController().getInterceptorWithId(new Integer(interceptorId), db);
          interceptionPoint.getInterceptors().add(interceptor);
          interceptor.getInterceptionPoints().add(interceptionPoint);
        }
      }
     
        logger.info("Interceptors:" + interceptionPoint.getInterceptors().size());
     
      commitTransaction(db);
    }
    catch (Exception e)
    {
View Full Code Here

   
    beginTransaction(db);

    try
    {
      InterceptionPoint interceptionPoint = this.getInterceptionPointWithId(interceptionPointVO.getInterceptionPointId(), db);
     
      List accessRights = AccessRightController.getController().getAccessRightList(interceptionPoint.getInterceptionPointId(), db);
      Iterator accessRightsIterator = accessRights.iterator();
      while(accessRightsIterator.hasNext())
      {
        AccessRight accessRight = (AccessRight)accessRightsIterator.next();
       
View Full Code Here

    List interceptionPointList = InterceptionPointController.getController().getInterceptionPointList("ContentVersion", db);
    logger.info("interceptionPointList:" + interceptionPointList.size());
    Iterator interceptionPointListIterator = interceptionPointList.iterator();
    while(interceptionPointListIterator.hasNext())
    {
      InterceptionPoint interceptionPoint = (InterceptionPoint)interceptionPointListIterator.next();
      List accessRightList = AccessRightController.getController().getAccessRightListForEntity(interceptionPoint.getId(), originalContentVersionId.toString(), db);
      logger.info("accessRightList:" + accessRightList.size());
      Iterator accessRightListIterator = accessRightList.iterator();
      while(accessRightListIterator.hasNext())
      {
        AccessRight accessRight = (AccessRight)accessRightListIterator.next();
View Full Code Here

           
            if(hasAccess != null)
            {
                if(accessRight == null)
                {
                  InterceptionPoint interceptionPoint = InterceptionPointController.getController().getInterceptionPointWithId(new Integer(interceptionPointIdString), db);
                accessRight = create(accessRightVO, interceptionPoint, db);
                }
               
                AccessRightRoleVO accessRightRoleVO = new AccessRightRoleVO();
                accessRightRoleVO.setRoleName(roleName);
                AccessRightRole accessRightRole = createAccessRightRole(db, accessRightRoleVO, accessRight);
                accessRight.getRoles().add(accessRightRole);
              accessRights++;
            }
           
            roleIndex++;
            roleName = request.getParameter(interceptionPointIdString + "_" + roleIndex + "_roleName");
          }
 
          int groupIndex = 0;
          String groupName = request.getParameter(interceptionPointIdString + "_" + groupIndex + "_groupName");
 
          while(groupName != null)
          {
            logger.info("groupName:" + groupName);
              if(accessRight == null)
              {
                InterceptionPoint interceptionPoint = InterceptionPointController.getController().getInterceptionPointWithId(new Integer(interceptionPointIdString), db);
                //logger.info("Creating access for:" + interceptionPoint.getName() + "_" + parameters);
              accessRight = create(accessRightVO, interceptionPoint, db);
              }
           
              AccessRightGroupVO accessRightGroupVO = new AccessRightGroupVO();
View Full Code Here

            if(accessRights == null || accessRights.size() == 0)
            {
            AccessRightVO accessRightVO = new AccessRightVO();
            accessRightVO.setParameters(parameters);

                InterceptionPoint interceptionPoint = InterceptionPointController.getController().getInterceptionPointWithId(new Integer(interceptionPointIdString), db);
            accessRight = create(accessRightVO, interceptionPoint, db);
            }
            else
            {
                accessRight = (AccessRight)accessRights.get(0);
View Full Code Here

      beginTransaction(db);
         
      for(int i=0; i<interceptionPointNames.length; i++)
      {
        String interceptionPointName = interceptionPointNames[i];
        InterceptionPoint interceptionPoint = InterceptionPointController.getController().getInterceptionPointWithName(interceptionPointName, db);
        if(interceptionPoint != null)
        {
          AccessRightVO accessRightVO = new AccessRightVO();
          accessRightVO.setParameters(parameters);
   
View Full Code Here

                    Database db = CastorDatabaseService.getDatabase();
              beginTransaction(db);
             
              try
              {
                      InterceptionPoint interceptionPoint = InterceptionPointController.getController().getInterceptionPointWithName(interceptionPointName, db);
                     
                      logger.info("interceptionPointName:" + interceptionPointName);
                    logger.info("parameters:" + parameters);
   
                    AccessRightVO accessRightVO = new AccessRightVO();
View Full Code Here

    Iterator<AccessRight> accessRightsIterator = accessRights.iterator();
    while(accessRightsIterator.hasNext())
    {
      AccessRight accessRight = accessRightsIterator.next();

      InterceptionPoint interceptionPoint = InterceptionPointController.getController().getInterceptionPointWithName(accessRight.getInterceptionPointName(), db);
      accessRight.setInterceptionPoint(interceptionPoint);
      if(interceptionPoint.getName().indexOf("Content") > -1)
        accessRight.setParameters((String)contentIdMap.get(accessRight.getParameters()));
      else if(interceptionPoint.getName().indexOf("SiteNodeVersion") > -1)
        accessRight.setParameters((String)siteNodeVersionIdMap.get(accessRight.getParameters()));
      else if(interceptionPoint.getName().indexOf("SiteNode") > -1)
        accessRight.setParameters((String)siteNodeIdMap.get(accessRight.getParameters()));
      else if(interceptionPoint.getName().indexOf("Repository") > -1)
        accessRight.setParameters((String)repositoryIdMap.get(accessRight.getParameters()));

      db.create(accessRight);

      Iterator accessRightRoleIterator = accessRight.getRoles().iterator();
View Full Code Here

    Iterator<AccessRight> accessRightsIterator = accessRights.iterator();
    while(accessRightsIterator.hasNext())
    {
      AccessRight accessRight = accessRightsIterator.next();

      InterceptionPoint interceptionPoint = InterceptionPointController.getController().getInterceptionPointWithName(accessRight.getInterceptionPointName(), db);
      if(interceptionPoint != null)
      {
        accessRight.setInterceptionPoint(interceptionPoint);
        if(interceptionPoint.getName().indexOf("Content") > -1)
          accessRight.setParameters((String)contentIdMap.get(accessRight.getParameters()));
        else if(interceptionPoint.getName().indexOf("SiteNodeVersion") > -1)
          accessRight.setParameters((String)siteNodeVersionIdMap.get(accessRight.getParameters()));
        else if(interceptionPoint.getName().indexOf("SiteNode") > -1)
          accessRight.setParameters((String)siteNodeIdMap.get(accessRight.getParameters()));
        else if(interceptionPoint.getName().indexOf("Repository") > -1)
          accessRight.setParameters((String)repositoryIdMap.get(accessRight.getParameters()));
 
        db.create(accessRight);
 
        Iterator accessRightRoleIterator = accessRight.getRoles().iterator();
View Full Code Here

TOP

Related Classes of org.infoglue.cms.entities.management.InterceptionPoint

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.