Package org.infoglue.cms.entities.management

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


      return accessRightVOList;
    }
     
    accessRightVOList = new ArrayList();
   
    InterceptionPointVO interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName(interceptionPointName, db);
    if(interceptionPointVO == null)
    {
      logger.info("interceptionPointName:" + interceptionPointName + " not found");
      return new ArrayList();
    }
   
    //Thread.dumpStack();
    logger.info("Reading the hard way from an unexpected place:" + interceptionPointName + ":" + parameters);
   
    List accessRightList = this.getAccessRightListOnlyReadOnly(interceptionPointVO.getId(), parameters, db);
   
    Iterator accessRightListIterator = accessRightList.iterator();
    while(accessRightListIterator.hasNext())
    {
        AccessRight accessRight = (AccessRight)accessRightListIterator.next();
View Full Code Here


 
  public List getAccessRightVOList(Database db, Integer interceptionPointId, String parameters, String roleName) throws SystemException, Bug
  {
    List accessRightVOList = null;
   
    InterceptionPointVO interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithId(interceptionPointId);
    if(interceptionPointVO.getUsesExtraDataForAccessControl().booleanValue())
      accessRightVOList = toVOList(getAccessRightList(interceptionPointId, parameters, roleName, db));
    else
      accessRightVOList = toVOList(getAccessRightList(interceptionPointId, roleName, db));

    logger.info("accessRightVOList:" + accessRightVOList.size());
View Full Code Here

      Integer contentVersionId = (Integer)extradata.get("contentVersionId");
      entityName = ContentVersion.class.getName();
      entityId = contentVersionId.toString();
      ContentVersionVO contentVersionVO = ContentVersionControllerProxy.getController().getContentVersionVOWithId(contentVersionId, db);
      ContentVO contentVO = ContentControllerProxy.getController().getContentVOWithId(contentVersionVO.getContentId(), db);
      InterceptionPointVO contentInterceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("Content.Write", db);

      String generalSubject = getLocalizedString(userLocale, "tool.common.subscriptionMail.generalSubject");
      String generalMessage = getLocalizedString(userLocale, "tool.common.subscriptionMail.generalMessage", entityName, entityId) + generalFooter;
      String subject = getLocalizedString(userLocale, "tool.common.subscriptionMail.contentUpdatedSubject");
      String message = getLocalizedString(userLocale, "tool.common.subscriptionMail.contentUpdatedMessage", contentVO.getName()) + generalFooter;

      addTransactionHistory(contentInterceptionPointVO, "SubscriptionsEvents", infoGluePrincipal.getName(), new Integer(999), Content.class.getName(), contentVersionVO.getContentId().toString(), subject, message);
      addTransactionHistory(interceptionPointVO, "SubscriptionsEvents", infoGluePrincipal.getName(), new Integer(999), entityName, entityId, generalSubject, generalMessage);
    }
    else if(interceptionPointVO.getName().equalsIgnoreCase("ContentVersion.Delete"))
    {
      Integer contentVersionId = (Integer)extradata.get("contentVersionId");
      entityName = ContentVersion.class.getName();
      entityId = contentVersionId.toString();
      ContentVersionVO contentVersionVO = ContentVersionControllerProxy.getController().getContentVersionVOWithId(contentVersionId, db);
      ContentVO contentVO = ContentControllerProxy.getController().getContentVOWithId(contentVersionVO.getContentId(), db);
      InterceptionPointVO contentInterceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("Content.Write", db); //TODO - is Content.Write correct
      addTransactionHistory(contentInterceptionPointVO, "SubscriptionsEvents", infoGluePrincipal.getName(), new Integer(999), Content.class.getName(), contentVersionVO.getContentId().toString(), "Subscription: Content deleted", "A user has changed the content '" + contentVO.getName() + "'. You subscribe to this event why this message is sent.");
      addTransactionHistory(interceptionPointVO, "SubscriptionsEvents", infoGluePrincipal.getName(), new Integer(999), entityName, entityId, "Subscription notification", "The entity " + entityName + " was deleted. You subscribe to this event why this message is sent.");
    }
    else if(interceptionPointVO.getName().equalsIgnoreCase("Content.ExpireDateComingUp"))
    {
View Full Code Here

     
      if(!contentVO.getCreatorName().equalsIgnoreCase(this.getInfoGluePrincipal().getName()))
      {
        if(ContentControllerProxy.getController().getIsContentProtected(contentId) && !AccessRightController.getController().getIsPrincipalAuthorized(this.getInfoGluePrincipal(), "Content.ChangeAccessRights", contentId.toString()))
        {
          InterceptionPointVO changeInterceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("Content.ChangeAccessRights");
          InterceptionPointVO readInterceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("Content.Read");
          List changeAccessRightVOList = AccessRightController.getController().getAccessRightVOListOnly(changeInterceptionPointVO.getId(), "" + contentId);
          List readAccessRightVOList = AccessRightController.getController().getAccessRightVOListOnly(readInterceptionPointVO.getId(), "" + contentId);
          logger.info("changeAccessRightVOList:" + changeAccessRightVOList.size());
          logger.info("readAccessRightVOList:" + readAccessRightVOList.size());
          if(changeAccessRightVOList.size() > 0 && readAccessRightVOList.size() > 0)
            ceb.add(new AccessConstraintException("Content.contentId", "1006"));
        }
      }
    }
    else if(interceptionPointCategory.equalsIgnoreCase("SiteNodeVersion"))
    { 
      if(extraParameters == null || extraParameters.equals(""))
          throw new SystemException("The sitenode category must have a sitenode id sent in so don't set 'Use extra data for access control' to no for those interception points.");

      Integer siteNodeVersionId = new Integer(extraParameters);
      SiteNodeVersionVO siteNodeVersionVO = SiteNodeVersionController.getController().getSiteNodeVersionVOWithId(siteNodeVersionId);
      SiteNodeVersionVO latestSiteNodeVersionVO = SiteNodeVersionController.getController().getLatestActiveSiteNodeVersionVO(siteNodeVersionVO.getSiteNodeId());
      if(latestSiteNodeVersionVO.getId().intValue() > siteNodeVersionVO.getId().intValue() && (getRequest().getParameter("forceVersion") == null || getRequest().getParameter("forceVersion").equals("")))
      {
        siteNodeVersionId = latestSiteNodeVersionVO.getId();
        siteNodeVersionVO = latestSiteNodeVersionVO;
        extraParameters = siteNodeVersionId.toString();
      }
      if(siteNodeVersionVO != null)
        unrefreshedNodeId = "" + siteNodeVersionVO.getSiteNodeId();
     
      if(!siteNodeVersionVO.getVersionModifier().equalsIgnoreCase(this.getInfoGluePrincipal().getName()))
      {
        boolean isSiteNodeVersionProtected = SiteNodeVersionControllerProxy.getSiteNodeVersionControllerProxy().getIsSiteNodeVersionProtected(siteNodeVersionVO.getId());
        Integer protectedSiteNodeVersionId = SiteNodeVersionControllerProxy.getSiteNodeVersionControllerProxy().getProtectedSiteNodeVersionId(siteNodeVersionId);
        if(protectedSiteNodeVersionId != null && !AccessRightController.getController().getIsPrincipalAuthorized(this.getInfoGluePrincipal(), "SiteNodeVersion.ChangeAccessRights", siteNodeVersionId.toString()))
        {
          InterceptionPointVO changeInterceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("SiteNodeVersion.ChangeAccessRights");
          InterceptionPointVO readInterceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("SiteNodeVersion.Read");
          List changeAccessRightVOList = AccessRightController.getController().getAccessRightVOListOnly(changeInterceptionPointVO.getId(), "" + siteNodeVersionVO.getId());
          List readAccessRightVOList = AccessRightController.getController().getAccessRightVOListOnly(readInterceptionPointVO.getId(), "" + siteNodeVersionVO.getId());
          logger.info("changeAccessRightVOList:" + changeAccessRightVOList.size());
          logger.info("readAccessRightVOList:" + readAccessRightVOList.size());
          if(changeAccessRightVOList.size() > 0 && readAccessRightVOList.size() > 0)
            ceb.add(new AccessConstraintException("SiteNodeVersion.siteNodeId", "1006"));
        }
View Full Code Here

        Integer repositoryId = new Integer(repositories[i]);
        Repository repository   = RepositoryController.getController().getRepositoryWithId(repositoryId, db);
        SiteNode siteNode     = SiteNodeController.getController().getRootSiteNode(repositoryId, db);
        Content content     = ContentController.getContentController().getRootContent(repositoryId, db);
       
          InterceptionPointVO interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("Repository.Read", db);
          if(interceptionPointVO != null)
            allAccessRights.addAll(AccessRightController.getController().getAccessRightListOnlyReadOnly(interceptionPointVO.getId(), repository.getId().toString(), db));

          interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("Repository.Write", db);
          if(interceptionPointVO != null)
            allAccessRights.addAll(AccessRightController.getController().getAccessRightListOnlyReadOnly(interceptionPointVO.getId(), repository.getId().toString(), db));

          interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("Repository.ReadForBinding", db);
          if(interceptionPointVO != null)
            allAccessRights.addAll(AccessRightController.getController().getAccessRightListOnlyReadOnly(interceptionPointVO.getId(), repository.getId().toString(), db));

        getContentPropertiesAndAccessRights(ps, allContentProperties, allAccessRights, content, db);
        if(siteNode != null)
          getSiteNodePropertiesAndAccessRights(ps, allSiteNodeProperties, allAccessRights, siteNode, db);
       
View Full Code Here

    if(ps.exists("content_" + content.getId() + "_defaultContentTypeName"))
      allContentProperties.put("content_" + content.getId() + "_defaultContentTypeName", "" + ps.getString("content_" + content.getId() + "_defaultContentTypeName"));
      if(ps.exists("content_" + content.getId() + "_initialLanguageId"))
        allContentProperties.put("content_" + content.getId() + "_initialLanguageId", "" + ps.getString("content_" + content.getId() + "_initialLanguageId"));

      InterceptionPointVO interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("Content.Read", db);
      if(interceptionPointVO != null)
        allAccessRights.addAll(AccessRightController.getController().getAccessRightListOnlyReadOnly(interceptionPointVO.getId(), content.getId().toString(), db));

      interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("Content.Write", db);
      if(interceptionPointVO != null)
        allAccessRights.addAll(AccessRightController.getController().getAccessRightListOnlyReadOnly(interceptionPointVO.getId(), content.getId().toString(), db));

      interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("Content.Create", db);
      if(interceptionPointVO != null)
        allAccessRights.addAll(AccessRightController.getController().getAccessRightListOnlyReadOnly(interceptionPointVO.getId(), content.getId().toString(), db));

      interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("Content.Delete", db);
      if(interceptionPointVO != null)
        allAccessRights.addAll(AccessRightController.getController().getAccessRightListOnlyReadOnly(interceptionPointVO.getId(), content.getId().toString(), db));

      interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("Content.Move", db);
      if(interceptionPointVO != null)
        allAccessRights.addAll(AccessRightController.getController().getAccessRightListOnlyReadOnly(interceptionPointVO.getId(), content.getId().toString(), db));

      interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("Content.SubmitToPublish", db);
      if(interceptionPointVO != null)
        allAccessRights.addAll(AccessRightController.getController().getAccessRightListOnlyReadOnly(interceptionPointVO.getId(), content.getId().toString(), db));
     
      interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("Content.ChangeAccessRights", db);
      if(interceptionPointVO != null)
        allAccessRights.addAll(AccessRightController.getController().getAccessRightListOnlyReadOnly(interceptionPointVO.getId(), content.getId().toString(), db));

      interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("Content.CreateVersion", db);
      if(interceptionPointVO != null)
        allAccessRights.addAll(AccessRightController.getController().getAccessRightListOnlyReadOnly(interceptionPointVO.getId(), content.getId().toString(), db));

      interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("ContentVersion.Delete", db);
      if(interceptionPointVO != null)
        allAccessRights.addAll(AccessRightController.getController().getAccessRightListOnlyReadOnly(interceptionPointVO.getId(), content.getId().toString(), db));

      interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("ContentVersion.Write", db);
      if(interceptionPointVO != null)
        allAccessRights.addAll(AccessRightController.getController().getAccessRightListOnlyReadOnly(interceptionPointVO.getId(), content.getId().toString(), db));

      interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("ContentVersion.Read", db);
      if(interceptionPointVO != null)
        allAccessRights.addAll(AccessRightController.getController().getAccessRightListOnlyReadOnly(interceptionPointVO.getId(), content.getId().toString(), db));

      interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("ContentVersion.Publish", db);
      if(interceptionPointVO != null)
        allAccessRights.addAll(AccessRightController.getController().getAccessRightListOnlyReadOnly(interceptionPointVO.getId(), content.getId().toString(), db));
       
        Iterator childContents = content.getChildren().iterator();
        while(childContents.hasNext())
        {
          Content childContent = (Content)childContents.next();
View Full Code Here

       
        SiteNodeVersionVO latestSiteNodeVersionVO = SiteNodeVersionController.getController().getLatestActiveSiteNodeVersionVO(db, siteNode.getId());
       
        if(latestSiteNodeVersionVO != null)
        {
          InterceptionPointVO interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("SiteNodeVersion.Read", db);
        if(interceptionPointVO != null)
          allAccessRights.addAll(AccessRightController.getController().getAccessRightListOnlyReadOnly(interceptionPointVO.getId(), latestSiteNodeVersionVO.getId().toString(), db));
 
        interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("SiteNodeVersion.Write", db);
        if(interceptionPointVO != null)
          allAccessRights.addAll(AccessRightController.getController().getAccessRightListOnlyReadOnly(interceptionPointVO.getId(), latestSiteNodeVersionVO.getId().toString(), db));
 
        interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("SiteNodeVersion.CreateSiteNode", db);
        if(interceptionPointVO != null)
          allAccessRights.addAll(AccessRightController.getController().getAccessRightListOnlyReadOnly(interceptionPointVO.getId(), latestSiteNodeVersionVO.getId().toString(), db));
 
        interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("SiteNodeVersion.DeleteSiteNode", db);
        if(interceptionPointVO != null)
          allAccessRights.addAll(AccessRightController.getController().getAccessRightListOnlyReadOnly(interceptionPointVO.getId(), latestSiteNodeVersionVO.getId().toString(), db));
 
        interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("SiteNodeVersion.MoveSiteNode", db);
        if(interceptionPointVO != null)
          allAccessRights.addAll(AccessRightController.getController().getAccessRightListOnlyReadOnly(interceptionPointVO.getId(), latestSiteNodeVersionVO.getId().toString(), db));
 
        interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("SiteNodeVersion.SubmitToPublish", db);
        if(interceptionPointVO != null)
          allAccessRights.addAll(AccessRightController.getController().getAccessRightListOnlyReadOnly(interceptionPointVO.getId(), latestSiteNodeVersionVO.getId().toString(), db));
 
        interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("SiteNodeVersion.ChangeAccessRights", db);
        if(interceptionPointVO != null)
          allAccessRights.addAll(AccessRightController.getController().getAccessRightListOnlyReadOnly(interceptionPointVO.getId(), latestSiteNodeVersionVO.getId().toString(), db));
 
        interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("SiteNodeVersion.Publish", db);
        if(interceptionPointVO != null)
          allAccessRights.addAll(AccessRightController.getController().getAccessRightListOnlyReadOnly(interceptionPointVO.getId(), latestSiteNodeVersionVO.getId().toString(), db));
        }
       
        Iterator childSiteNodes = siteNode.getChildSiteNodes().iterator();
        while(childSiteNodes.hasNext())
        {
View Full Code Here

  private List allInterceptors;
    private List assignedInterceptors;

    public ViewInterceptionPointAction()
    {
        this(new InterceptionPointVO());
    }
View Full Code Here

      String names = "";
      Repository repository   = RepositoryController.getController().getRepositoryWithId(repositoryId, db);
      SiteNode siteNode     = SiteNodeController.getController().getRootSiteNode(repositoryId, db);
      Content content     = ContentController.getContentController().getRootContent(repositoryId, db);

        InterceptionPointVO interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("Repository.Read", db);
        if(interceptionPointVO != null)
          allAccessRights.addAll(AccessRightController.getController().getAccessRightListOnlyReadOnly(interceptionPointVO.getId(), repository.getId().toString(), db));

        interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("Repository.Write", db);
        if(interceptionPointVO != null)
          allAccessRights.addAll(AccessRightController.getController().getAccessRightListOnlyReadOnly(interceptionPointVO.getId(), repository.getId().toString(), db));

        interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("Repository.ReadForBinding", db);
        if(interceptionPointVO != null)
          allAccessRights.addAll(AccessRightController.getController().getAccessRightListOnlyReadOnly(interceptionPointVO.getId(), repository.getId().toString(), db));

        ExportRepositoryAction.getContentPropertiesAndAccessRights(ps, allContentProperties, allAccessRights, content, db);
        ExportRepositoryAction.getSiteNodePropertiesAndAccessRights(ps, allSiteNodeProperties, allAccessRights, siteNode, db);
     
      siteNodes.add(siteNode);
View Full Code Here

      try
      {
        beginTransaction(db);

        logger.info("Let's check access rights so they are not null CONTENT...");
        InterceptionPointVO ipReadVO = InterceptionPointController.getController().getInterceptionPointVOWithName("Content.Read", db);
        InterceptionPointVO ipWriteVO = InterceptionPointController.getController().getInterceptionPointVOWithName("Content.Write", db);
        if(ipReadVO != null && ipWriteVO != null)
        {
          List accessRightListRead = AccessRightController.getController().getAccessRightListOnlyReadOnly(ipReadVO.getId(), "" + contentVO.getId(), db);
          List accessRightListWrite = AccessRightController.getController().getAccessRightListOnlyReadOnly(ipWriteVO.getId(), "" + contentVO.getId(), db);
          if((accessRightListRead == null || accessRightListRead.size() == 0) && (accessRightListWrite == null || accessRightListWrite.size() == 0))
          {
            logger.info("Removing isProtected as there are no access rights");
            Content c = ContentController.getContentController().getContentWithId(contentVO.getId(), db);
            if(c != null)
View Full Code Here

TOP

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

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.