org.exoplatform.wiki.mow.core.api.wiki
Class SimplePageImpl

java.lang.Object
  extended by org.exoplatform.wiki.mow.core.api.wiki.SimplePageImpl
All Implemented Interfaces:
Page

public class SimplePageImpl
extends Object
implements Page

Simple Page implementation, includes only getter and setter methods.


Constructor Summary
SimplePageImpl(String name, String title, String owner)
           
 
Method Summary
 void addPublicPage(Page page)
          Add a public wiki page
 void addWikiPage(Page page)
          Add a wiki page as child page
 SimplePageImpl attachments(Collection<? extends Attachment> attachments)
           
 SimplePageImpl author(String author)
           
 SimplePageImpl comment(String comment)
           
 SimplePageImpl createDate(Date date)
           
 Collection<? extends Attachment> getAttachments()
          Get the attachments of this page
 String getAuthor()
          The Author is changed when any part of the document changes (content, attachments).
 String getComment()
           
 Attachment getContent()
          Get the actual content of the page
 Date getCreatedDate()
          The date when creating page.
 javax.jcr.Node getJCRPageNode()
          Get JCR node of wiki page
 String getName()
          Get jcr node name
 String getOwner()
          Get the owner of the page
 PageImpl getParentPage()
          get the parent page
 HashMap<String,String[]> getPermission()
          Get map of permission of page
 String getSyntax()
          Get the syntax used in that page
 String getTitle()
           
 Date getUpdatedDate()
          The date when any part of the document changes (content, attachments).
 String getURL()
          get URL of page.
 VersionableMixin getVersionableMixin()
          get Versionable Mixin
 Wiki getWiki()
          get Wiki of page
 SimplePageImpl hasPermission(boolean hasPermission)
           
 boolean hasPermission(PermissionType permissionType)
           
 boolean hasPermission(PermissionType permissionType, org.exoplatform.services.security.Identity user)
          Check if user has permisison on page or not
 boolean isMinorEdit()
          is page in minor edit or not
 SimplePageImpl permission(HashMap<String,String[]> permission)
           
 void remove()
          Detroy wiki page
 void setComment(String comment)
           
 void setMinorEdit(boolean isMinorEdit)
          is page in minor edit or not
 void setName(String name)
          set jcr node name
 void setNonePermission()
          Reset page permisison
 void setPermission(HashMap<String,String[]> permissions)
          Set permission to page
 void setSyntax(String syntax)
           
 void setTitle(String title)
           
 void setURL(String url)
          set url
 SimplePageImpl syntax(String syntax)
           
 SimplePageImpl updateDate(Date date)
           
 SimplePageImpl url(String url)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimplePageImpl

public SimplePageImpl(String name,
                      String title,
                      String owner)
Method Detail

author

public SimplePageImpl author(String author)

comment

public SimplePageImpl comment(String comment)

url

public SimplePageImpl url(String url)

attachments

public SimplePageImpl attachments(Collection<? extends Attachment> attachments)

createDate

public SimplePageImpl createDate(Date date)

updateDate

public SimplePageImpl updateDate(Date date)

hasPermission

public SimplePageImpl hasPermission(boolean hasPermission)

permission

public SimplePageImpl permission(HashMap<String,String[]> permission)

syntax

public SimplePageImpl syntax(String syntax)

getAttachments

public Collection<? extends Attachment> getAttachments()
Description copied from interface: Page
Get the attachments of this page

Specified by:
getAttachments in interface Page
Returns:

getAuthor

public String getAuthor()
Description copied from interface: Page
The Author is changed when any part of the document changes (content, attachments).

Specified by:
getAuthor in interface Page

getComment

public String getComment()
Specified by:
getComment in interface Page

getContent

public Attachment getContent()
Description copied from interface: Page
Get the actual content of the page

Specified by:
getContent in interface Page
Returns:

getCreatedDate

public Date getCreatedDate()
Description copied from interface: Page
The date when creating page.

Specified by:
getCreatedDate in interface Page

getName

public String getName()
Description copied from interface: Page
Get jcr node name

Specified by:
getName in interface Page
Returns:
jcr node name

getOwner

public String getOwner()
Description copied from interface: Page
Get the owner of the page

Specified by:
getOwner in interface Page
Returns:

getPermission

public HashMap<String,String[]> getPermission()
                                       throws Exception
Description copied from interface: Page
Get map of permission of page

Specified by:
getPermission in interface Page
Returns:
Throws:
Exception

getSyntax

public String getSyntax()
Description copied from interface: Page
Get the syntax used in that page

Specified by:
getSyntax in interface Page
Returns:

getTitle

public String getTitle()
Specified by:
getTitle in interface Page

getUpdatedDate

public Date getUpdatedDate()
Description copied from interface: Page
The date when any part of the document changes (content, attachments).

Specified by:
getUpdatedDate in interface Page

hasPermission

public boolean hasPermission(PermissionType permissionType)
                      throws Exception
Specified by:
hasPermission in interface Page
Throws:
Exception

hasPermission

public boolean hasPermission(PermissionType permissionType,
                             org.exoplatform.services.security.Identity user)
                      throws Exception
Description copied from interface: Page
Check if user has permisison on page or not

Specified by:
hasPermission in interface Page
Parameters:
permissionType - The type of permisison to check PermissionType}
user - The user to check
Returns:
User has permisison on page or not
Throws:
Exception

setComment

public void setComment(String comment)
Specified by:
setComment in interface Page

setPermission

public void setPermission(HashMap<String,String[]> permissions)
                   throws Exception
Description copied from interface: Page
Set permission to page

Specified by:
setPermission in interface Page
Throws:
Exception

setSyntax

public void setSyntax(String syntax)
Specified by:
setSyntax in interface Page

setTitle

public void setTitle(String title)
Specified by:
setTitle in interface Page

getURL

public String getURL()
Description copied from interface: Page
get URL of page. The domain part of link can be fixed.

Specified by:
getURL in interface Page

addWikiPage

public void addWikiPage(Page page)
Description copied from interface: Page
Add a wiki page as child page

Specified by:
addWikiPage in interface Page

getJCRPageNode

public javax.jcr.Node getJCRPageNode()
                              throws Exception
Description copied from interface: Page
Get JCR node of wiki page

Specified by:
getJCRPageNode in interface Page
Returns:
JCR node of wiki page
Throws:
Exception

setName

public void setName(String name)
Description copied from interface: Page
set jcr node name

Specified by:
setName in interface Page
Parameters:
name - Nodename

getVersionableMixin

public VersionableMixin getVersionableMixin()
Description copied from interface: Page
get Versionable Mixin

Specified by:
getVersionableMixin in interface Page
Returns:
Versionable Mixin

remove

public void remove()
Description copied from interface: Page
Detroy wiki page

Specified by:
remove in interface Page

getWiki

public Wiki getWiki()
Description copied from interface: Page
get Wiki of page

Specified by:
getWiki in interface Page
Returns:
Wiki of page

setMinorEdit

public void setMinorEdit(boolean isMinorEdit)
Description copied from interface: Page
is page in minor edit or not

Specified by:
setMinorEdit in interface Page

setURL

public void setURL(String url)
Description copied from interface: Page
set url

Specified by:
setURL in interface Page

getParentPage

public PageImpl getParentPage()
Description copied from interface: Page
get the parent page

Specified by:
getParentPage in interface Page
Returns:
the parent page

addPublicPage

public void addPublicPage(Page page)
                   throws Exception
Description copied from interface: Page
Add a public wiki page

Specified by:
addPublicPage in interface Page
Throws:
Exception

setNonePermission

public void setNonePermission()
                       throws Exception
Description copied from interface: Page
Reset page permisison

Specified by:
setNonePermission in interface Page
Throws:
Exception

isMinorEdit

public boolean isMinorEdit()
Description copied from interface: Page
is page in minor edit or not

Specified by:
isMinorEdit in interface Page
Returns:


Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.