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

java.lang.Object
  extended by org.chromattic.ext.ntdef.NTHierarchyNode
      extended by org.chromattic.ext.ntdef.NTFile
          extended by org.exoplatform.wiki.mow.core.api.wiki.AttachmentImpl
All Implemented Interfaces:
Comparable<AttachmentImpl>, Attachment

public abstract class AttachmentImpl
extends org.chromattic.ext.ntdef.NTFile
implements Attachment, Comparable<AttachmentImpl>


Constructor Summary
AttachmentImpl()
           
 
Method Summary
 NTVersion checkin()
           
 void checkout()
           
 int compareTo(AttachmentImpl o)
           
protected abstract  PageDescriptionMixin createPageDescriptionMixin()
           
protected abstract  VersionableMixin createVersionableMixin()
           
 org.chromattic.api.ChromatticSession getChromatticSession()
           
 Calendar getCreatedDate()
          Date of the creation
abstract  String getCreator()
          Creator of the last version of the attachment
 String getDownloadURL()
          URL to download the attachment
abstract  String getFileType()
           
 String getFullTitle()
           
 String getJCRContentPath()
           
 javax.jcr.Node getJCRNode()
           
abstract  String getName()
           
 PageDescriptionMixin getPageDescriptionMixin()
           
abstract  PageDescriptionMixin getPageDescriptionMixinByChromattic()
           
abstract  PageImpl getParentPage()
           
abstract  String getPath()
           
 HashMap<String,String[]> getPermission()
           
 String getText()
          Get the text representation of the content item
abstract  String getTitle()
           
 Calendar getUpdatedDate()
          Date of last update of this attachment
 VersionableMixin getVersionableMixin()
           
abstract  VersionableMixin getVersionableMixinByChromattic()
           
 long getWeightInBytes()
          Get the weight of the attachment in bytes
abstract  String getWorkspace()
           
 boolean hasPermission(PermissionType permissionType)
           
 void makeVersionable()
           
abstract  void remove()
           
 void restore(String versionName, boolean removeExisting)
           
abstract  void setCreator(String creator)
           
abstract  void setFileType(String fileType)
           
abstract  void setName(String name)
           
protected abstract  void setPageDescriptionMixinByChromattic(PageDescriptionMixin mix)
           
 void setPermission(HashMap<String,String[]> permissions)
           
 void setText(String text)
           
abstract  void setTitle(String title)
           
protected abstract  void setVersionableMixinByChromattic(VersionableMixin mix)
           
 
Methods inherited from class org.chromattic.ext.ntdef.NTFile
createResource, getContent, getContentResource, getLastModified, setContent, setContentResource
 
Methods inherited from class org.chromattic.ext.ntdef.NTHierarchyNode
getCreated, getParent, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttachmentImpl

public AttachmentImpl()
Method Detail

getName

public abstract String getName()
Specified by:
getName in class org.chromattic.ext.ntdef.NTHierarchyNode

setName

public abstract void setName(String name)

getPath

public abstract String getPath()

getJCRContentPath

public String getJCRContentPath()

getWorkspace

public abstract String getWorkspace()

getTitle

public abstract String getTitle()
Specified by:
getTitle in interface Attachment

setTitle

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

getFileType

public abstract String getFileType()

setFileType

public abstract void setFileType(String fileType)

getCreator

public abstract String getCreator()
Description copied from interface: Attachment
Creator of the last version of the attachment

Specified by:
getCreator in interface Attachment
Returns:

setCreator

public abstract void setCreator(String creator)

getCreatedDate

public Calendar getCreatedDate()
Description copied from interface: Attachment
Date of the creation

Specified by:
getCreatedDate in interface Attachment
Returns:

getWeightInBytes

public long getWeightInBytes()
Description copied from interface: Attachment
Get the weight of the attachment in bytes

Specified by:
getWeightInBytes in interface Attachment
Returns:

getUpdatedDate

public Calendar getUpdatedDate()
Description copied from interface: Attachment
Date of last update of this attachment

Specified by:
getUpdatedDate in interface Attachment
Returns:

getDownloadURL

public String getDownloadURL()
Description copied from interface: Attachment
URL to download the attachment

Specified by:
getDownloadURL in interface Attachment
Returns:

getFullTitle

public String getFullTitle()

getParentPage

public abstract PageImpl getParentPage()

remove

public abstract void remove()

getText

public String getText()
Description copied from interface: Attachment
Get the text representation of the content item

Specified by:
getText in interface Attachment
Returns:

setText

public void setText(String text)
Specified by:
setText in interface Attachment

hasPermission

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

getPermission

public HashMap<String,String[]> getPermission()
                                       throws Exception
Specified by:
getPermission in interface Attachment
Throws:
Exception

setPermission

public void setPermission(HashMap<String,String[]> permissions)
                   throws Exception
Specified by:
setPermission in interface Attachment
Throws:
Exception

compareTo

public int compareTo(AttachmentImpl o)
Specified by:
compareTo in interface Comparable<AttachmentImpl>

getVersionableMixinByChromattic

public abstract VersionableMixin getVersionableMixinByChromattic()

setVersionableMixinByChromattic

protected abstract void setVersionableMixinByChromattic(VersionableMixin mix)

createVersionableMixin

protected abstract VersionableMixin createVersionableMixin()

getVersionableMixin

public VersionableMixin getVersionableMixin()

makeVersionable

public void makeVersionable()

checkin

public NTVersion checkin()
                  throws Exception
Throws:
Exception

checkout

public void checkout()
              throws Exception
Throws:
Exception

restore

public void restore(String versionName,
                    boolean removeExisting)
             throws Exception
Throws:
Exception

getChromatticSession

public org.chromattic.api.ChromatticSession getChromatticSession()

getJCRNode

public javax.jcr.Node getJCRNode()
                          throws Exception
Throws:
Exception

getPageDescriptionMixinByChromattic

public abstract PageDescriptionMixin getPageDescriptionMixinByChromattic()

setPageDescriptionMixinByChromattic

protected abstract void setPageDescriptionMixinByChromattic(PageDescriptionMixin mix)

createPageDescriptionMixin

protected abstract PageDescriptionMixin createPageDescriptionMixin()

getPageDescriptionMixin

public PageDescriptionMixin getPageDescriptionMixin()


Copyright © 2003–2014 eXo Platform SAS. All rights reserved.