org.jahia.workflow
Class AuthoringContentTreeVisitor

java.lang.Object
  extended by org.jahia.content.AbstractContentTreeVisitor
      extended by org.jahia.workflow.AuthoringContentTreeVisitor
All Implemented Interfaces:
ContentTreeVisitorInterface

public class AuthoringContentTreeVisitor
extends AbstractContentTreeVisitor

Title: A Visitor used to check if a user has any write right ( Authoring ) on any Content Object of a given page

Description:

Copyright: Copyright (c) 2002

Company:

Version:
1.0
Author:
Khue Nguyen

Field Summary
static int ADMIN_RIGHTS
           
protected  java.util.ArrayList contents
           
protected  ContentTree contentTree
           
static int READ_RIGHTS
           
static int WRITE_RIGHTS
           
 
Constructor Summary
AuthoringContentTreeVisitor(ContentObject rootContentObject, JahiaUser user, int permission, boolean iterateAll, EntryLoadRequest loadRequest, java.lang.String operationMode)
           
 
Method Summary
 java.util.ArrayList getChilds(ContentObject contentObject, int currentPageLevel)
          Returns an array list of childs for a given ContentObject
 java.util.ArrayList getContents()
          Return the array list of ContentObjects the user has access
 ContentTree getContentTree()
          Return the internal ContentTree used to traverse the Content Tree
 ContentTreeStatusInterface getContentTreeStatus(ContentObject contentObject, int currentPageLevel)
          Returns a ContentTreeStatus implementation for a given ContentObject
static AuthoringContentTreeVisitor getInstance(ContentObject rootContentObject, JahiaUser user, int permission, boolean iterateAll, EntryLoadRequest loadRequest, java.lang.String operationMode)
           
 void processContentObjectBeforeChilds(ContentObject contentObject, ContentTreeStatusInterface contentTreeStatus, int currentPageLevel)
          process the current content object when traversing the tree
 void visite()
          Start visiting the tree
 
Methods inherited from class org.jahia.content.AbstractContentTreeVisitor
getDescendingPageLevel, getEntryLoadRequest, getOperationMode, getUser, processContentObjectAfterChilds, processContentObjectBeforeChilds, processLastContentPageField, setDescendingPageLevel, setEntryLoadRequest, setOperationMode, setUser, stopProcessContentObjectAfterChilds, withChildsContent, withChildsContent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

READ_RIGHTS

public static final int READ_RIGHTS
See Also:
Constant Field Values

WRITE_RIGHTS

public static final int WRITE_RIGHTS
See Also:
Constant Field Values

ADMIN_RIGHTS

public static final int ADMIN_RIGHTS
See Also:
Constant Field Values

contentTree

protected ContentTree contentTree

contents

protected java.util.ArrayList contents
Constructor Detail

AuthoringContentTreeVisitor

public AuthoringContentTreeVisitor(ContentObject rootContentObject,
                                   JahiaUser user,
                                   int permission,
                                   boolean iterateAll,
                                   EntryLoadRequest loadRequest,
                                   java.lang.String operationMode)
Parameters:
rootContentObject -
user -
permission -
loadRequest -
operationMode -
jParams -
Method Detail

getInstance

public static AuthoringContentTreeVisitor getInstance(ContentObject rootContentObject,
                                                      JahiaUser user,
                                                      int permission,
                                                      boolean iterateAll,
                                                      EntryLoadRequest loadRequest,
                                                      java.lang.String operationMode)

visite

public void visite()
            throws JahiaException
Start visiting the tree

Throws:
JahiaException

getContentTree

public ContentTree getContentTree()
Return the internal ContentTree used to traverse the Content Tree

Specified by:
getContentTree in interface ContentTreeVisitorInterface
Specified by:
getContentTree in class AbstractContentTreeVisitor
Returns:

getContentTreeStatus

public ContentTreeStatusInterface getContentTreeStatus(ContentObject contentObject,
                                                       int currentPageLevel)
                                                throws JahiaException
Returns a ContentTreeStatus implementation for a given ContentObject

Specified by:
getContentTreeStatus in interface ContentTreeVisitorInterface
Specified by:
getContentTreeStatus in class AbstractContentTreeVisitor
Parameters:
contentObject -
Returns:
Throws:
JahiaException

processContentObjectBeforeChilds

public void processContentObjectBeforeChilds(ContentObject contentObject,
                                             ContentTreeStatusInterface contentTreeStatus,
                                             int currentPageLevel)
                                      throws JahiaException
process the current content object when traversing the tree

Parameters:
contentObject -
contentTreeStatus -
currentPageLevel -
Throws:
JahiaException

getContents

public java.util.ArrayList getContents()
Return the array list of ContentObjects the user has access

Returns:

getChilds

public java.util.ArrayList getChilds(ContentObject contentObject,
                                     int currentPageLevel)
                              throws JahiaException
Returns an array list of childs for a given ContentObject

Specified by:
getChilds in interface ContentTreeVisitorInterface
Overrides:
getChilds in class AbstractContentTreeVisitor
Parameters:
contentObject -
currentPageLevel -
Returns:
Throws:
JahiaException


Copyright © 1999-2008 Jahia Ltd. All Rights Reserved.