Class AbstractWikiItem

java.lang.Object
fr.paris.lutece.plugins.wiki.business.item.AbstractWikiItem
All Implemented Interfaces:
fr.paris.lutece.portal.service.rbac.RBACResource, Serializable, Cloneable
Direct Known Subclasses:
Book, Category, Chapter, Page, Space

public abstract class AbstractWikiItem extends Object implements fr.paris.lutece.portal.service.rbac.RBACResource, Serializable, Cloneable
See Also:
  • Constructor Details

    • AbstractWikiItem

      public AbstractWikiItem()
      Default constructor
  • Method Details

    • getId

      public int getId()
      Get the wiki item id
      Returns:
      the wiki item id
    • setId

      public void setId(int nId)
      Set the wiki item id
      Parameters:
      nId - the wiki item id
    • getCode

      public String getCode()
      Get the wiki item code
      Returns:
      the wiki item code
    • setCode

      public void setCode(String strCode)
      Set the wiki item code
      Parameters:
      strCode - the wiki item code
    • getIcon

      public String getIcon()
    • setIcon

      public void setIcon(String strIcon)
    • isPublished

      public boolean isPublished()
      Check if the wiki item is published
      Returns:
      true if published, false otherwise
    • setIsPublished

      public void setIsPublished(boolean bIsPublished)
      Set the published status
      Parameters:
      bIsPublished - the published status
    • getViewRole

      public String getViewRole()
      Get the view role
      Returns:
      the view role
    • setViewRole

      public void setViewRole(String strViewRole)
      Set the view role
      Parameters:
      strViewRole - the view role
    • getEditRole

      public String getEditRole()
      Get the edit role
      Returns:
      the edit role
    • setEditRole

      public void setEditRole(String strEditRole)
      Set the edit role
      Parameters:
      strEditRole - the edit role
    • getType

      public WikiItemType getType()
      Get the wiki item type
      Returns:
      the wiki item type
    • setType

      public void setType(WikiItemType type)
      Set the wiki item type
      Parameters:
      type - the wiki item type
    • getIdParent

      public Integer getIdParent()
      Get the parent id
      Returns:
      the parent id
    • setIdParent

      public void setIdParent(Integer nIdParent)
      Set the parent id
      Parameters:
      nIdParent - the parent id
    • getDateCreation

      public Timestamp getDateCreation()
      Get the creation date
      Returns:
      the creation date
    • setDateCreation

      public void setDateCreation(Timestamp dateCreation)
      Set the creation date
      Parameters:
      dateCreation - the creation date
    • setDateModification

      public void setDateModification(Timestamp dateModification)
      Set the modification date
      Parameters:
      dateModification - the modification date
    • getCurrentRevision

      public Revision getCurrentRevision()
      Get the current revision
      Returns:
      the current revision
    • setCurrentRevision

      public void setCurrentRevision(Revision currentRevision)
      Set the current revision
      Parameters:
      currentRevision - the current revision
    • getChildren

      public List<AbstractWikiItem> getChildren()
      Get the list of children
      Returns:
      the list of children
    • setChildren

      public void setChildren(List<AbstractWikiItem> listChildren)
      Set the list of children
      Parameters:
      listChildren - the list of children
    • getOrder

      public int getOrder()
      Get the order
      Returns:
      the order
    • setOrder

      public void setOrder(int order)
      Set the order
      Parameters:
      order - the order
    • hasOrder

      public boolean hasOrder()
      Check if the wiki item has an order
      Returns:
      true if has order, false otherwise
    • getParent

      public AbstractWikiItem getParent()
      Get the parent wiki item
      Returns:
      the parent wiki item or null if no parent
    • getBreadcrumb

      public String getBreadcrumb()
      Get the full breadcrumb path of this item (e.g. "Space > Category > Book > Chapter")
      Returns:
      the breadcrumb path
    • getResourceTypeCode

      public String getResourceTypeCode()
      Get the resource type code for RBAC
      Specified by:
      getResourceTypeCode in interface fr.paris.lutece.portal.service.rbac.RBACResource
      Returns:
      the resource type code
    • getResourceId

      public String getResourceId()
      Get the resource id for RBAC
      Specified by:
      getResourceId in interface fr.paris.lutece.portal.service.rbac.RBACResource
      Returns:
      the resource id
    • getResourceType

      public abstract String getResourceType()
      Get the resource type
      Returns:
      the resource type
    • getChildType

      public WikiItemType getChildType()
      Get the child item type
      Returns:
      the child item type or null if no children
    • getAllowedChildTypes

      public abstract Set<WikiItemType> getAllowedChildTypes()
      Get all allowed child item types
      Returns:
      the set of allowed child item types, empty set if no children allowed
    • getAllowedParentTypes

      public abstract Set<WikiItemType> getAllowedParentTypes()
      Get all allowed parent item types
      Returns:
      the set of allowed parent item types, empty set if no parent allowed
    • supportsContent

      public boolean supportsContent()
      Check if this wiki item type supports content in revisions
      Returns:
      true if content is supported, false otherwise
    • getViewUrl

      public String getViewUrl()
      Get the view URL for this item
      Returns:
      the view URL
    • getParentViewUrl

      public String getParentViewUrl()
      Get the view URL for the parent of this item
      Returns:
      the parent view URL
    • clone

      public AbstractWikiItem clone()
      Clone the wiki item
      Returns:
      a copy of the wiki item