Java Doc for VersionableItem.java in  » Rule-Engine » drolls-Rule-Engine » org » drools » repository » 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 » Rule Engine » drolls Rule Engine » org.drools.repository 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.drools.repository.Item
      org.drools.repository.VersionableItem

All known Subclasses:   org.drools.repository.PackageItem,  org.drools.repository.CategorisableItem,
VersionableItem
abstract public class VersionableItem extends Item (Code)
This is the parent class for versionable assets. Contains standard fields based on Dublin Core, and stuff required for versioning. For dublin core, refer to Here
See Also:   CategorisableItem
See Also:    for more attributes to do with BRMS resources.
author:
   Ben Truitt, Michael Neale


Field Summary
final public static  StringCATEGORY_PROPERTY_NAME
    
final public static  StringCHECKIN_COMMENT
    
final public static  StringCONTENT_PROPERTY_ARCHIVE_FLAG
    
final public static  StringCOVERAGE_PROPERTY_NAME
    
final public static  StringCREATOR_PROPERTY_NAME
    
final public static  StringDEFAULT_CONTENT_FORMAT
    
final public static  StringDESCRIPTION_PROPERTY_NAME
    
final public static  StringFORMAT_PROPERTY_NAME
    
final public static  StringLAST_CONTRIBUTOR_PROPERTY_NAME
     Dublin core based fields.
final public static  StringLAST_MODIFIED_PROPERTY_NAME
    
final public static  StringPUBLISHER_PROPERTY_NAME
    
final public static  StringRELATION_PROPERTY_NAME
    
final public static  StringRIGHTS_PROPERTY_NAME
    
final public static  StringSOURCE_PROPERTY_NAME
    
final public static  StringSTATE_PROPERTY_NAME
    
final public static  StringSUBJECT_PROPERTY_NAME
    
final public static  StringTITLE_PROPERTY_NAME
     Property names for this node type.
final public static  StringTYPE_PROPERTY_NAME
    
final public static  StringVERSION_NUMBER_PROPERTY_NAME
    

Constructor Summary
public  VersionableItem(RulesRepository rulesRepository, Node node)
    

Method Summary
public  VersionableItemarchiveItem(boolean data)
    
protected  voidcheckIsUpdateable()
     This will check to see if the node is the "head" and so can be updated (you can't update historical nodes ).
public  voidcheckin(String comment)
     This will save the content (if it hasn't been already) and then check it in to create a new version.
public  voidcheckout()
     This will check out the node prior to editing.
public  StringgetCheckinComment()
     This will return the checkin comment for the latest revision.
public  StringgetCoverage()
     Typically, Coverage will include spatial location (a place name or geographic coordinates), temporal period (a period label, date, or date range) or jurisdiction (such as a named administrative entity).
public  CalendargetCreatedDate()
     This returns the date/time on which the asset was "ORIGINALLY CREATED".
public  StringgetCreator()
     This is the person who initially created the resource.
public  StringgetDescription()
    
public  StringgetExternalRelation()
     A reference to a EXTERNAL related resource.
public  StringgetExternalSource()
     This is the source of the asset/rule.
public  StringgetFormat()
     This returns the format of an item. This is analagous to a file extension if the resource was a file (it may contain more information then a pure file extension could, however).
public  StringgetLastContributor()
     Returns the last contributors name.
public  CalendargetLastModified()
    
protected  longgetLongProperty(String property)
    
public  StringgetName()
    
abstract public  VersionableItemgetPrecedingVersion()
     Clients of this method can cast the resulting object to the type of object they are calling the method on (e.g.
protected  NodegetPrecedingVersionNode()
    
 ItemVersionIteratorgetPredecessorVersionsIterator()
    
public  StringgetPublisher()
     Examples of Publisher include a person, an organization, or a service.
protected  NodegetRealContentFromVersion(Node node)
     This deals with a node which *may* be a version, if it is, it grabs the frozen copy.
public  StringgetRights()
     Optionally contains any copyright/ownership rights for the asset.
public  StateItemgetState()
    
public  StringgetStateDescription()
     This will return the current state item as a displayable thing.
protected  StringgetStringProperty(String property)
    
public  StringgetSubject()
     Typically, Subject will be expressed as keywords, key phrases or classification codes that describe a topic of the resource.
abstract public  VersionableItemgetSucceedingVersion()
     Clients of this method can cast the resulting object to the type of object they are calling the method on (e.g.
protected  NodegetSucceedingVersionNode()
    
 ItemVersionIteratorgetSuccessorVersionsIterator()
    
public  StringgetTitle()
     Gets the Title of the versionable node.
public  StringgetType()
     This is the Dublin Core field of type (a broad classification of resource type).
public  StringgetUUID()
    
public  NodegetVersionContentNode()
     When retrieving content, if we are dealing with a version in the history, we need to get the actual content node to retrieve values.
public  longgetVersionNumber()
     get this version number (default is incrementing integer, but you can provide an implementation of VersionNumberGenerator if needed).
public  StringgetVersionSnapshotUUID()
     This returns the id of the exact version node (as opposed to the "main" node).
public  booleanisArchived()
    
public  booleanisHistoricalVersion()
     This will return true if the current entity is actually a historical version (which means is effectively read only).
public  booleansameState(StateItem other)
    
public  voidupdateCoverage(String cov)
    
public  voidupdateDescription(String newDescriptionContent)
     Creates a new version of this object's node, updating the description content for the node.
public  voidupdateExternalRelation(String rel)
    
public  voidupdateExternalSource(String source)
    
public  voidupdateFormat(String newFormat)
     This sets the format (or "file extension" of the resource).
public  voidupdatePublisher(String pub)
    
public  voidupdateRights(String rights)
    
public  voidupdateState(String stateName)
    
public  voidupdateState(StateItem stateItem)
    
protected  voidupdateStringProperty(String value, String prop)
     update a text field.
public  voidupdateSubject(String sub)
    
public  voidupdateTitle(String title)
    
public  voidupdateType(String type)
    

Field Detail
CATEGORY_PROPERTY_NAME
final public static String CATEGORY_PROPERTY_NAME(Code)
The name of the tag property on the rule node type



CHECKIN_COMMENT
final public static String CHECKIN_COMMENT(Code)



CONTENT_PROPERTY_ARCHIVE_FLAG
final public static String CONTENT_PROPERTY_ARCHIVE_FLAG(Code)



COVERAGE_PROPERTY_NAME
final public static String COVERAGE_PROPERTY_NAME(Code)



CREATOR_PROPERTY_NAME
final public static String CREATOR_PROPERTY_NAME(Code)



DEFAULT_CONTENT_FORMAT
final public static String DEFAULT_CONTENT_FORMAT(Code)
The possible formats for the format property of the node



DESCRIPTION_PROPERTY_NAME
final public static String DESCRIPTION_PROPERTY_NAME(Code)



FORMAT_PROPERTY_NAME
final public static String FORMAT_PROPERTY_NAME(Code)



LAST_CONTRIBUTOR_PROPERTY_NAME
final public static String LAST_CONTRIBUTOR_PROPERTY_NAME(Code)
Dublin core based fields.



LAST_MODIFIED_PROPERTY_NAME
final public static String LAST_MODIFIED_PROPERTY_NAME(Code)



PUBLISHER_PROPERTY_NAME
final public static String PUBLISHER_PROPERTY_NAME(Code)



RELATION_PROPERTY_NAME
final public static String RELATION_PROPERTY_NAME(Code)



RIGHTS_PROPERTY_NAME
final public static String RIGHTS_PROPERTY_NAME(Code)



SOURCE_PROPERTY_NAME
final public static String SOURCE_PROPERTY_NAME(Code)



STATE_PROPERTY_NAME
final public static String STATE_PROPERTY_NAME(Code)
The name of the state property on the rule node type



SUBJECT_PROPERTY_NAME
final public static String SUBJECT_PROPERTY_NAME(Code)



TITLE_PROPERTY_NAME
final public static String TITLE_PROPERTY_NAME(Code)
Property names for this node type.



TYPE_PROPERTY_NAME
final public static String TYPE_PROPERTY_NAME(Code)



VERSION_NUMBER_PROPERTY_NAME
final public static String VERSION_NUMBER_PROPERTY_NAME(Code)




Constructor Detail
VersionableItem
public VersionableItem(RulesRepository rulesRepository, Node node)(Code)
Sets this object's node attribute to the specified node
Parameters:
  rulesRepository - the RulesRepository object that this object is being created from
Parameters:
  node - the node in the repository that this item corresponds to




Method Detail
archiveItem
public VersionableItem archiveItem(boolean data)(Code)



checkIsUpdateable
protected void checkIsUpdateable()(Code)
This will check to see if the node is the "head" and so can be updated (you can't update historical nodes ).
throws:
  RulesRepositoryException - if it is not allowed(means a programming error !).



checkin
public void checkin(String comment)(Code)
This will save the content (if it hasn't been already) and then check it in to create a new version. It will also set the last modified property.



checkout
public void checkout()(Code)
This will check out the node prior to editing.



getCheckinComment
public String getCheckinComment() throws RulesRepositoryException(Code)
This will return the checkin comment for the latest revision.



getCoverage
public String getCoverage()(Code)
Typically, Coverage will include spatial location (a place name or geographic coordinates), temporal period (a period label, date, or date range) or jurisdiction (such as a named administrative entity). Recommended best practice is to select a value from a controlled vocabulary (for example, the Thesaurus of Geographic Names [TGN]) and to use, where appropriate, named places or time periods in preference to numeric identifiers such as sets of coordinates or date ranges.



getCreatedDate
public Calendar getCreatedDate()(Code)
This returns the date/time on which the asset was "ORIGINALLY CREATED". Kinda handy if you want to know how old something is.



getCreator
public String getCreator()(Code)
This is the person who initially created the resource.



getDescription
public String getDescription() throws RulesRepositoryException(Code)
See the Dublin Core documentation for more explanation: http://dublincore.org/documents/dces/ the description of this object's node.
throws:
  RulesRepositoryException -



getExternalRelation
public String getExternalRelation()(Code)
A reference to a EXTERNAL related resource.



getExternalSource
public String getExternalSource()(Code)
This is the source of the asset/rule. Ie a human description of where it came from.



getFormat
public String getFormat() throws RulesRepositoryException(Code)
This returns the format of an item. This is analagous to a file extension if the resource was a file (it may contain more information then a pure file extension could, however). See the Dublin Core documentation for more explanation: http://dublincore.org/documents/dces/ the format of this object's node
throws:
  RulesRepositoryException -



getLastContributor
public String getLastContributor()(Code)
Returns the last contributors name.



getLastModified
public Calendar getLastModified() throws RulesRepositoryException(Code)
the date the function node (this version) was last modified
throws:
  RulesRepositoryException -



getLongProperty
protected long getLongProperty(String property)(Code)



getName
public String getName()(Code)
Need to get the name from the content node, not the version node if it is in fact a version !



getPrecedingVersion
abstract public VersionableItem getPrecedingVersion() throws RulesRepositoryException(Code)
Clients of this method can cast the resulting object to the type of object they are calling the method on (e.g.
 RuleItem item;
 ...
 RuleItem predcessor = (RuleItem) item.getPrecedingVersion();
 
a VersionableItem object encapsulating the predessor node of this node in the version history, or null if no predecessor version exists
throws:
  RulesRepositoryException -



getPrecedingVersionNode
protected Node getPrecedingVersionNode() throws RulesRepositoryException(Code)
the predessor node of this node in the version history, or null if no predecessor version exists
throws:
  RulesRepositoryException -



getPredecessorVersionsIterator
ItemVersionIterator getPredecessorVersionsIterator() throws RulesRepositoryException(Code)
an Iterator over VersionableItem objects encapsulating each predecessor node of this Item's node
throws:
  RulesRepositoryException -



getPublisher
public String getPublisher()(Code)
Examples of Publisher include a person, an organization, or a service. Typically, the name of a Publisher should be used to indicate the entity.



getRealContentFromVersion
protected Node getRealContentFromVersion(Node node) throws RepositoryException, PathNotFoundException(Code)
This deals with a node which *may* be a version, if it is, it grabs the frozen copy.



getRights
public String getRights()(Code)
Optionally contains any copyright/ownership rights for the asset.



getState
public StateItem getState() throws RulesRepositoryException(Code)
Gets StateItem object corresponding to the state property of this object's node a StateItem object corresponding to the state property of this object's node, or nullif the state property is not set
throws:
  RulesRepositoryException -



getStateDescription
public String getStateDescription()(Code)
This will return the current state item as a displayable thing. If there is no state, it will be an empty string.



getStringProperty
protected String getStringProperty(String property)(Code)



getSubject
public String getSubject()(Code)
Typically, Subject will be expressed as keywords, key phrases or classification codes that describe a topic of the resource.



getSucceedingVersion
abstract public VersionableItem getSucceedingVersion() throws RulesRepositoryException(Code)
Clients of this method can cast the resulting object to the type of object they are calling the method on (e.g.
 RuleItem item;
 ...
 RuleItem successor = (RuleItem) item.getSucceedingVersion();
 
a VersionableItem object encapsulating the successor node of this node in the version history.
throws:
  RulesRepositoryException -



getSucceedingVersionNode
protected Node getSucceedingVersionNode() throws RulesRepositoryException(Code)
the successor node of this node in the version history
throws:
  RulesRepositoryException -



getSuccessorVersionsIterator
ItemVersionIterator getSuccessorVersionsIterator() throws RulesRepositoryException(Code)
an Iterator over VersionableItem objects encapsulating each successor node of this Item's node
throws:
  RulesRepositoryException -



getTitle
public String getTitle() throws RulesRepositoryException(Code)
Gets the Title of the versionable node. See the Dublin Core documentation for more explanation: http://dublincore.org/documents/dces/ the title of the node this object encapsulates
throws:
  RulesRepositoryException -



getType
public String getType()(Code)
This is the Dublin Core field of type (a broad classification of resource type).



getUUID
public String getUUID()(Code)
A unique identifier for this items content node.This UUID is constant even with new versions, it represents the asset, and ALL its historical versions.



getVersionContentNode
public Node getVersionContentNode() throws RepositoryException, PathNotFoundException(Code)
When retrieving content, if we are dealing with a version in the history, we need to get the actual content node to retrieve values.



getVersionNumber
public long getVersionNumber()(Code)
get this version number (default is incrementing integer, but you can provide an implementation of VersionNumberGenerator if needed).



getVersionSnapshotUUID
public String getVersionSnapshotUUID()(Code)
This returns the id of the exact version node (as opposed to the "main" node). Note that each asset has only one UUID the whole time, but there are also UUIDs for each item in the history. So while the main UUID version remains constant, the version UUIDs change on each checkin, which is what this method provides.



isArchived
public boolean isArchived()(Code)
Test if the VersionableItem is archived



isHistoricalVersion
public boolean isHistoricalVersion() throws RepositoryException(Code)
This will return true if the current entity is actually a historical version (which means is effectively read only).



sameState
public boolean sameState(StateItem other)(Code)
Compare this rules state with some other state



updateCoverage
public void updateCoverage(String cov)(Code)



updateDescription
public void updateDescription(String newDescriptionContent) throws RulesRepositoryException(Code)
Creates a new version of this object's node, updating the description content for the node.
See the Dublin Core documentation for more explanation: http://dublincore.org/documents/dces/
Parameters:
  newDescriptionContent - the new description content for the rule
throws:
  RulesRepositoryException -



updateExternalRelation
public void updateExternalRelation(String rel)(Code)



updateExternalSource
public void updateExternalSource(String source)(Code)



updateFormat
public void updateFormat(String newFormat)(Code)
This sets the format (or "file extension" of the resource). In some cases this is critical, and generally should not be changed after the initial version is checked in.
Parameters:
  newFormat -



updatePublisher
public void updatePublisher(String pub)(Code)



updateRights
public void updateRights(String rights)(Code)



updateState
public void updateState(String stateName) throws RulesRepositoryException(Code)
Sets this object's rule node's state property to refer to the specified state node
Parameters:
  stateName - the name of the state to set the rule node to
throws:
  RulesRepositoryException -



updateState
public void updateState(StateItem stateItem) throws RulesRepositoryException(Code)
Sets this object's rule node's state property to refer to the specified StateItem's node
Parameters:
  stateItem - the StateItem encapsulating the node to refer to from this object's node's state property
throws:
  RulesRepositoryException -



updateStringProperty
protected void updateStringProperty(String value, String prop)(Code)
update a text field. This is a convenience method that just uses the JCR node to set a property. This will also update the timestamp.



updateSubject
public void updateSubject(String sub)(Code)



updateTitle
public void updateTitle(String title) throws RulesRepositoryException(Code)
See the Dublin Core documentation for more explanation: http://dublincore.org/documents/dces/
Parameters:
  title - the new title for the node
throws:
  RulesRepositoryException -



updateType
public void updateType(String type)(Code)



Fields inherited from org.drools.repository.Item
Logger log(Code)(Java Doc)
protected Node node(Code)(Java Doc)
protected RulesRepository rulesRepository(Code)(Java Doc)

Methods inherited from org.drools.repository.Item
public boolean equals(Object obj)(Code)(Java Doc)
public String getName() throws RulesRepositoryException(Code)(Java Doc)
public Node getNode()(Code)(Java Doc)
public RulesRepository getRulesRepository()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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