com.webmethods.caf.jcr.faces.data
Class SubFolderJcrAttachmentsProvider

java.lang.Object
  extended by com.webmethods.caf.faces.bean.PageFlowScopeAdapter
      extended by com.webmethods.caf.jcr.faces.data.JcrAttachmentsProvider
          extended by com.webmethods.caf.jcr.faces.data.SubFolderJcrAttachmentsProvider
All Implemented Interfaces:
IPageFlowScopeAdapter, IAttachmentsProvider, IWebDavAwareAttachmentsProvider, Serializable

public class SubFolderJcrAttachmentsProvider
extends JcrAttachmentsProvider

Content provider for exposing the children of a JCR node subfolder for use with the CAF AttachmentsPanel control. If a subfolder whose name matches the subFolderName does not exist, the folder is created (if permissions allow it).

Since:
8.0
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.webmethods.caf.jcr.faces.data.JcrAttachmentsProvider
JcrAttachmentsProvider.ErrorReportingMode, JcrAttachmentsProvider.JcrAttachmentItem, JcrAttachmentsProvider.JcrFileItem
 
Field Summary
protected  String subFolderName
          The subfolder name
 
Fields inherited from class com.webmethods.caf.jcr.faces.data.JcrAttachmentsProvider
autoSave, iconBaseUrl, jcrFileServletPath, jcrSession, parentId, parentNode, parentPath, useWebDav
 
Fields inherited from class com.webmethods.caf.faces.bean.PageFlowScopeAdapter
fExpireWithPageFlow
 
Constructor Summary
SubFolderJcrAttachmentsProvider()
           
 
Method Summary
protected  Node getOrCreateSubFolderNode(Node parentNode)
          Get the subfolder if it already exists, or creates it if it does not exist.
 Node getParentNode()
          Returns a reference to the JCR Node that is the parent of the attachments.
 String getSubFolderName()
          Returns the subfolder name
 void setSubFolderName(String subFolderName)
          Sets the subfolder name
 
Methods inherited from class com.webmethods.caf.jcr.faces.data.JcrAttachmentsProvider
addAttachment, getHasAttachments, getIconBaseUrl, getJcrFileServletPath, getJcrSession, getParentId, getParentPath, getSafeFileName, isAddAttachmentsAvailable, isAutoSave, isUseWebDav, listAttachments, refresh, removeAttachment, reportError, safeNodeSave, sanityCheck, setAutoSave, setIconBaseUrl, setJcrFileServletPath, setJcrSession, setParentId, setParentPath, setUseWebDav, updateAttachment
 
Methods inherited from class com.webmethods.caf.faces.bean.PageFlowScopeAdapter
getExpireWithPageFlow, setExpireWithPageFlow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

subFolderName

protected String subFolderName
The subfolder name

Constructor Detail

SubFolderJcrAttachmentsProvider

public SubFolderJcrAttachmentsProvider()
Method Detail

getSubFolderName

public String getSubFolderName()
Returns the subfolder name

Returns:
the subFolderName

setSubFolderName

public void setSubFolderName(String subFolderName)
Sets the subfolder name

Parameters:
subFolderName - the subFolderName to set

getOrCreateSubFolderNode

protected Node getOrCreateSubFolderNode(Node parentNode)
                                 throws RepositoryException,
                                        PathNotFoundException,
                                        ItemExistsException,
                                        NoSuchNodeTypeException,
                                        LockException,
                                        VersionException,
                                        ConstraintViolationException
Get the subfolder if it already exists, or creates it if it does not exist.

Parameters:
parentNode - the parentNode of the attachments subfolder
Throws:
RepositoryException
PathNotFoundException
ItemExistsException
NoSuchNodeTypeException
LockException
VersionException
ConstraintViolationException

getParentNode

public Node getParentNode()
Description copied from class: JcrAttachmentsProvider
Returns a reference to the JCR Node that is the parent of the attachments.

Overrides:
getParentNode in class JcrAttachmentsProvider
Returns:
the parentNode