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

java.lang.Object
  extended by com.webmethods.caf.faces.bean.PageFlowScopeAdapter
      extended by com.webmethods.caf.jcr.faces.data.AttachmentsMigrationProvider
All Implemented Interfaces:
IPageFlowScopeAdapter

public class AttachmentsMigrationProvider
extends PageFlowScopeAdapter

Provider for migrating files from an attachment provider to another folder.


Field Summary
protected static String CHARSET_EQUALS
          Key string used to append encoding to mimetype
protected static String OUTCOME_ERROR
          Outcome for failed action
protected static String OUTCOME_OK
          Outcome for successful action
 
Fields inherited from class com.webmethods.caf.faces.bean.PageFlowScopeAdapter
fExpireWithPageFlow
 
Constructor Summary
AttachmentsMigrationProvider()
           
 
Method Summary
 String copyAttachments()
          Action that copies attachments from the source attachment provider to the destination attachment provider
 String getDestParentId()
          Returns the destination parent node id
 String getDestParentPath()
          Returns the destination parent path
protected  String getEncoding(String mimeType)
          Returns encoding from mimeType string, null if not defined
 Session getJcrSession()
          Returns the current JCR session
 IAttachmentsProvider getSourceProvider()
          Returns the source attachments provider
 String moveAttachments()
          Action that copies attachments from the source attachment provider to the destination attachment provider
 void setDestParentId(String destParentId)
          Sets the destination parent node id
 void setDestParentPath(String destParentPath)
          Sets the destination parent path
 void setJcrSession(Session jcrSession)
          Sets the current JCR session
 void setSourceProvider(IAttachmentsProvider sourceProvider)
          Sets the source attachments provider
 
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

OUTCOME_OK

protected static final String OUTCOME_OK
Outcome for successful action

See Also:
Constant Field Values

OUTCOME_ERROR

protected static final String OUTCOME_ERROR
Outcome for failed action

See Also:
Constant Field Values

CHARSET_EQUALS

protected static final String CHARSET_EQUALS
Key string used to append encoding to mimetype

See Also:
Constant Field Values
Constructor Detail

AttachmentsMigrationProvider

public AttachmentsMigrationProvider()
Method Detail

getJcrSession

public Session getJcrSession()
Returns the current JCR session

Returns:
the jcrSession

setJcrSession

public void setJcrSession(Session jcrSession)
Sets the current JCR session

Parameters:
jcrSession - the jcrSession to set

getSourceProvider

public IAttachmentsProvider getSourceProvider()
Returns the source attachments provider

Returns:
the sourceProvider

setSourceProvider

public void setSourceProvider(IAttachmentsProvider sourceProvider)
Sets the source attachments provider

Parameters:
sourceProvider - the sourceProvider to set

getDestParentId

public String getDestParentId()
Returns the destination parent node id

Returns:
the destParentId

setDestParentId

public void setDestParentId(String destParentId)
Sets the destination parent node id

Parameters:
destParentId - the destParentId to set

getDestParentPath

public String getDestParentPath()
Returns the destination parent path

Returns:
the destParentPath

setDestParentPath

public void setDestParentPath(String destParentPath)
Sets the destination parent path

Parameters:
destParentPath - the destParentPath to set

getEncoding

protected String getEncoding(String mimeType)
Returns encoding from mimeType string, null if not defined

Parameters:
mimeType -
Returns:
the encoding extracted from the mimeType

moveAttachments

public String moveAttachments()
Action that copies attachments from the source attachment provider to the destination attachment provider

Returns:
"ok" or "error"

copyAttachments

public String copyAttachments()
Action that copies attachments from the source attachment provider to the destination attachment provider

Returns:
"ok" or "error"