Java Doc for ResourceToolActionPipe.java in  » ERP-CRM-Financial » sakai » org » sakaiproject » content » api » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ERP CRM Financial » sakai » org.sakaiproject.content.api 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.sakaiproject.content.api.ResourceToolActionPipe

All known Subclasses:   org.sakaiproject.content.impl.BasicResourceToolActionPipe,
ResourceToolActionPipe
public interface ResourceToolActionPipe (Code)
ResourceToolActionPipe provides a conduit through which ResourcesAction and an unknown helper may communicate about the execution of ResourceToolActions in which the registered action specifies that some part of the action is handled by a helper. ResourceToolActionPipe has a set of methods through which ResourcesAction can pass information to a helper about the current state of the entity (or entities?) involved in an action ("setContent", "getContent", "setMimeType", "getMimeType", etc). It has another set of methods through which the helper passes back values that may or may not have been updated as a result of the action ("setRevisedContent", "getRevisedContent", "setRevisedMimeType", "getRevisedMimeType", etc). If a value is not changed by the action, the helper should use an appropriate setter to indicate the revised value is the same as the original value. For example: pipe.setRevisedMimeType( pipe.getMimeType() ); Otherwise, the getter for the revised value will return null, and ResourcesAction will set unset the property. ResourceToolActionPipe also has a few methods through which the helper can report whether the action was canceled or an error was encountered.
See Also:   org.sakaiproject.content.api.ResourceTypeRegistry
See Also:   org.sakaiproject.content.api.ResourceToolAction
See Also:   org.sakaiproject.content.api.InteractionAction




Method Summary
public  ResourceToolActiongetAction()
    
public  byte[]getContent()
     Used by helper to access current value of resource's "content".
public  ContentEntitygetContentEntity()
     Used by helper to access an existing ContentEntity involved in this action.
public  InputStreamgetContentStream()
     Used by helper to access current value of resource's "content" in cases where size or type of content requires stream access.
public  StringgetContentstring()
     Used by helper to access current value of resource's "content" as a UTF-8 string.
public  StringgetErrorMessage()
     Used by the Resources tool to retrieve error message that will be shown to user in its list view after completion of helper activity in which "error encountered" is set to true and an error is reported.
public  StringgetFileName()
     Used only for actions of type ResourceToolAction.ActionType.NEW_UPLOAD.
public  intgetFileUploadSize()
     Used only for actions of type ResourceToolAction.ActionType.NEW_UPLOAD.
public  StringgetHelperId()
    
public  StringgetInitializationId()
     Used by helper to access the initialization-id for this action, if an initialization-id was returned when ResourcesAction invoked the InteractionAction.initializeAction() method.
public  StringgetMimeType()
     Used by helper to access current mimetype of resource.
public  ObjectgetPropertyValue(String name)
     Used by helper to access current value of any resource property that has been specified by registrant in InteractionAction.
public  byte[]getRevisedContent()
     Used by ResourceAction to access helper's revised value of resource's "content".
public  InputStreamgetRevisedContentStream()
     Used by ResourceAction to access helper's revised value of resource's "content".
public  ObjectgetRevisedListItem()
     Used by the Resources tool to retrieve aListItem from an individual pipe contained within a MultiFileUploadPipe.
public  StringgetRevisedMimeType()
     Used by ResourceAction to access helper's revised value for mimetype of resource.
public  MapgetRevisedResourceProperties()
     Used by ResourceAction to access helper's revisions to values of resource properties.
public  booleanisActionCanceled()
     May be accessed by ResourcesAction after completion of helper activity to determine whether action was canceled.
public  booleanisActionCompleted()
    
public  booleanisErrorEncountered()
     May be accessed by ResourcesAction after completion of helper activity to determine whether an error was encountered.
public  voidsetActionCanceled(boolean actionCanceled)
     Used by helper to indicate that User canceled the action and the action was not completed.
public  voidsetActionCompleted(boolean actionCompleted)
    
public  voidsetContent(byte[] content)
     Used by ResourcesAction to provide helper with current value of resource's "content".
public  voidsetContentEntity(ContentEntity entity)
     Used by ResourcesAction to provide an existing ContentEntity involved in this action.
public  voidsetContentStream(InputStream ostream)
     Used by ResourcesAction to provide helper with alternative access to current value of resource's "content".
public  voidsetErrorEncountered(boolean errorEncountered)
     Used by helper to indicate that an error was encountered which prevented completion of the action.
public  voidsetErrorMessage(String msg)
     Used by helper to report error to user after completion of helper's portion of wizard.
public  voidsetFileName(String fileName)
     Used only for actions of type ResourceToolAction.ActionType.NEW_UPLOAD.
public  voidsetHelperId(String helperId)
    
public  voidsetInitializationId(String id)
     Used by ResourcesAction to provide a value for the initialization-id.
public  voidsetMimeType(String type)
     Used by ResourcesAction to provide helper with mimetype of resource.
public  voidsetResourceProperty(String key, List list)
     Used by ResourcesAction to provide helper with current value of a requested resource property whose value is a List of Strings.
public  voidsetResourceProperty(String name, String value)
     Used by ResourcesAction to provide helper with current value of a requested resource property whose value is a single String.
public  voidsetRevisedContent(byte[] content)
     Used by helper to provide ResourcesAction with revised value of resource's "content".
public  voidsetRevisedContentStream(InputStream stream)
     Used by helper to provide ResourcesAction with revised value of resource's "content".
public  voidsetRevisedListItem(Object item)
     Used only for individual pipes contained within a MultiFileUploadPipe, to return values of properties set in the helper.
public  voidsetRevisedMimeType(String type)
     Used by helper to provide ResourcesAction with revised mimetype of resource.
public  voidsetRevisedResourceProperty(String name, List list)
     Used by helper to provide ResourcesAction with revised value for a resource property whose value is a List of Strings.
public  voidsetRevisedResourceProperty(String name, String value)
     Used by helper to provide ResourcesAction with revised value for a resource property. Any property other than "live" properties can be set with this method.



Method Detail
getAction
public ResourceToolAction getAction()(Code)



getContent
public byte[] getContent()(Code)
Used by helper to access current value of resource's "content". Return will be empty array to indicate no content is defined for resource or null to indicate that content should be accessed as an OutputStream because of size or type of content.



getContentEntity
public ContentEntity getContentEntity()(Code)
Used by helper to access an existing ContentEntity involved in this action. If the action is "create", the entity is a collection within which a new resource is being created. Otherwise the entity is a resource of the type involved in this action.



getContentStream
public InputStream getContentStream()(Code)
Used by helper to access current value of resource's "content" in cases where size or type of content requires stream access. Return may be null to indicate that content should be accessed as a byte array.



getContentstring
public String getContentstring()(Code)
Used by helper to access current value of resource's "content" as a UTF-8 string. Return will be empty string to indicate no content is defined for resource or null to indicate that content should be accessed as an OutputStream because of size or type of content.



getErrorMessage
public String getErrorMessage()(Code)
Used by the Resources tool to retrieve error message that will be shown to user in its list view after completion of helper activity in which "error encountered" is set to true and an error is reported.



getFileName
public String getFileName()(Code)
Used only for actions of type ResourceToolAction.ActionType.NEW_UPLOAD. Retains the name of a file that has been uploaded recently as a reminder in the user interface.



getFileUploadSize
public int getFileUploadSize()(Code)
Used only for actions of type ResourceToolAction.ActionType.NEW_UPLOAD.



getHelperId
public String getHelperId()(Code)



getInitializationId
public String getInitializationId()(Code)
Used by helper to access the initialization-id for this action, if an initialization-id was returned when ResourcesAction invoked the InteractionAction.initializeAction() method. The return value of this method will be null if an initialization-id was not supplied by that method.



getMimeType
public String getMimeType()(Code)
Used by helper to access current mimetype of resource. Null value or empy string indicates that mimetype is irrelevant or unavailable.



getPropertyValue
public Object getPropertyValue(String name)(Code)
Used by helper to access current value of any resource property that has been specified by registrant in InteractionAction. Returns null if property value is not defined. Otherwise returns a String or a List of Strings



getRevisedContent
public byte[] getRevisedContent()(Code)
Used by ResourceAction to access helper's revised value of resource's "content". An empty array indicates that the resource has no content. A null value indicates that the content should be accessed as a stream.



getRevisedContentStream
public InputStream getRevisedContentStream()(Code)
Used by ResourceAction to access helper's revised value of resource's "content". If both the byte-array and the stream are null, or if the byte-array is null and the stream does not contain any data, the resource is assumed to have no content.



getRevisedListItem
public Object getRevisedListItem()(Code)
Used by the Resources tool to retrieve aListItem from an individual pipe contained within a MultiFileUploadPipe. The Resources tool assumes the values of properties set by the helper are to be used in creating a new entity. The Resources tool will ignore the item unless it is an instance of org.sakaiproject.content.tool.ListItem.



getRevisedMimeType
public String getRevisedMimeType()(Code)
Used by ResourceAction to access helper's revised value for mimetype of resource.



getRevisedResourceProperties
public Map getRevisedResourceProperties()(Code)
Used by ResourceAction to access helper's revisions to values of resource properties.



isActionCanceled
public boolean isActionCanceled()(Code)
May be accessed by ResourcesAction after completion of helper activity to determine whether action was canceled. If the action was not canceled and no error was encountered, ResourcesAction will assume that the action completed successfully.



isActionCompleted
public boolean isActionCompleted()(Code)



isErrorEncountered
public boolean isErrorEncountered()(Code)
May be accessed by ResourcesAction after completion of helper activity to determine whether an error was encountered. If the action was not canceled and no error was encountered, ResourcesAction will assume that the action completed successfully.



setActionCanceled
public void setActionCanceled(boolean actionCanceled)(Code)
Used by helper to indicate that User canceled the action and the action was not completed.
Parameters:
  actionCanceled -



setActionCompleted
public void setActionCompleted(boolean actionCompleted)(Code)

Parameters:
  actionCompleted -



setContent
public void setContent(byte[] content)(Code)
Used by ResourcesAction to provide helper with current value of resource's "content".



setContentEntity
public void setContentEntity(ContentEntity entity)(Code)
Used by ResourcesAction to provide an existing ContentEntity involved in this action. If the action is "create", the entity is a collection within which a new resource is being created. Otherwise the entity is a resource of the type involved in this action.
Parameters:
  entity -



setContentStream
public void setContentStream(InputStream ostream)(Code)
Used by ResourcesAction to provide helper with alternative access to current value of resource's "content".
Parameters:
  content -



setErrorEncountered
public void setErrorEncountered(boolean errorEncountered)(Code)
Used by helper to indicate that an error was encountered which prevented completion of the action.
Parameters:
  actionCanceled -



setErrorMessage
public void setErrorMessage(String msg)(Code)
Used by helper to report error to user after completion of helper's portion of wizard. Most errors in the helper should be dealt with in the helper. This is for unusual errors that can not be dealt with in the helper and are tossed back to the Resources tool. If a message is reported and "error encountered" is set to true, the Resources tool will display the message in its list view. The message should be localized (i.e. read from a resource bundle).
Parameters:
  msg -



setFileName
public void setFileName(String fileName)(Code)
Used only for actions of type ResourceToolAction.ActionType.NEW_UPLOAD. Retains the name of a file that has been uploaded recently as a reminder in the user interface.
Parameters:
  fileName -



setHelperId
public void setHelperId(String helperId)(Code)

Parameters:
  helperId -



setInitializationId
public void setInitializationId(String id)(Code)
Used by ResourcesAction to provide a value for the initialization-id. Should be initialized to the value returned by the InteractionAction.initializeAction() method (possibly null or an empty string is this information is not needed by the helper).



setMimeType
public void setMimeType(String type)(Code)
Used by ResourcesAction to provide helper with mimetype of resource.
Parameters:
  ostream -



setResourceProperty
public void setResourceProperty(String key, List list)(Code)
Used by ResourcesAction to provide helper with current value of a requested resource property whose value is a List of Strings.
Parameters:
  key -
Parameters:
  list -



setResourceProperty
public void setResourceProperty(String name, String value)(Code)
Used by ResourcesAction to provide helper with current value of a requested resource property whose value is a single String.
Parameters:
  name -
Parameters:
  value -



setRevisedContent
public void setRevisedContent(byte[] content)(Code)
Used by helper to provide ResourcesAction with revised value of resource's "content".
Parameters:
  content -



setRevisedContentStream
public void setRevisedContentStream(InputStream stream)(Code)
Used by helper to provide ResourcesAction with revised value of resource's "content".
Parameters:
  stream -



setRevisedListItem
public void setRevisedListItem(Object item)(Code)
Used only for individual pipes contained within a MultiFileUploadPipe, to return values of properties set in the helper. The parameter must be an instance of org.sakaiproject.content.tool.ListItem. The Resources tool will ignore the item unless it is an instance of org.sakaiproject.content.tool.ListItem.
Parameters:
  item -



setRevisedMimeType
public void setRevisedMimeType(String type)(Code)
Used by helper to provide ResourcesAction with revised mimetype of resource. Mimetype will not be referenced if param is null.
Parameters:
  type -



setRevisedResourceProperty
public void setRevisedResourceProperty(String name, List list)(Code)
Used by helper to provide ResourcesAction with revised value for a resource property whose value is a List of Strings. Any property other than "live" properties can be set with this method. If action definition names the property and it is not set by this method, current value(s) will be removed.
Parameters:
  name -
Parameters:
  list -



setRevisedResourceProperty
public void setRevisedResourceProperty(String name, String value)(Code)
Used by helper to provide ResourcesAction with revised value for a resource property. Any property other than "live" properties can be set with this method. If action definition names the property and it is not set by this method, current value will be removed.
Parameters:
  name -
Parameters:
  value -



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.