Source Code Cross Referenced for Editable.java in  » Content-Management-System » harmonise » org » openharmonise » rm » resources » lifecycle » 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 » Content Management System » harmonise » org.openharmonise.rm.resources.lifecycle 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * The contents of this file are subject to the 
003:         * Mozilla Public License Version 1.1 (the "License"); 
004:         * you may not use this file except in compliance with the License. 
005:         * You may obtain a copy of the License at http://www.mozilla.org/MPL/
006:         *
007:         * Software distributed under the License is distributed on an "AS IS"
008:         * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. 
009:         * See the License for the specific language governing rights and 
010:         * limitations under the License.
011:         *
012:         * The Initial Developer of the Original Code is Simulacra Media Ltd.
013:         * Portions created by Simulacra Media Ltd are Copyright (C) Simulacra Media Ltd, 2004.
014:         *
015:         * All Rights Reserved.
016:         *
017:         * Contributor(s):
018:         */
019:        package org.openharmonise.rm.resources.lifecycle;
020:
021:        import java.util.List;
022:
023:        import org.openharmonise.rm.DataAccessException;
024:        import org.openharmonise.rm.resources.users.User;
025:
026:        /**
027:         * The <code>Editable</code> interface provides for objects which can be edited 
028:         * within a versioning system.
029:         * 
030:         * @author Michael Bell
031:         * @version $Revision: 1.2 $
032:         *
033:         */
034:        public interface Editable {
035:            //lock label
036:            public static final String LABEL_LOCK = "lock";
037:            //unlock label
038:            public static final String LABEL_UNLOCK = "unlock";
039:
040:            /**
041:             * Saves current data to data store. If the object being saved is a live version
042:             * and data has been changed, a new unapproved version is created. This method will 
043:             * return the result of the save operation, i.e. if it is an unapproved object the 
044:             * orginal object will be returned, otherwise the newly created unapproved version
045:             * will be returned.
046:             * 
047:             * @return
048:             * @throws EditException
049:             */
050:            public Editable save() throws EditException;
051:
052:            /**
053:             * Returns a new version of this editable object, if the current version is a live
054:             * version, otherwise is returns the current object.
055:             * 
056:             * @return
057:             * @throws EditException
058:             */
059:            public Editable createNewVersion() throws EditException;
060:
061:            /** Archives this object in to the store of historical objects.
062:             *
063:             * @return The archived object
064:             */
065:            public Editable archive() throws EditException;
066:
067:            /** 
068:             * Alters the status of this object to the given status.
069:             *
070:             * @param nStatus The new Status
071:             * @return The new version of this object of the given status
072:             */
073:            public Editable changeStatus(Status nStatus) throws EditException;
074:
075:            /**
076:             * Tests whether the object is locked.
077:             * 
078:             * @return
079:             * @throws DataAccessException
080:             */
081:            public boolean isLocked() throws DataAccessException;
082:
083:            /**
084:             * Locks this object, its unapproved versions and live version if exist.
085:             * Checks that user id matches lock id, if already locked do nothing.
086:             *
087:             * @param nUserId
088:             * @throws EditException if object locked by another user.
089:             */
090:            public void lock(User usr) throws EditException;
091:
092:            /**
093:             * Unlocks this object, its unapproved versions and parent if exist.
094:             * Check that user id matches lock id or that user has permisssion to perform the
095:             * unlock, if unlocked do nothing.
096:             *
097:             * @param nUserId
098:             * @throws EditException if user id does not match lock id
099:             */
100:            public void unlock(User usr) throws EditException;
101:
102:            /**
103:             * Returns the user who owns the lock on this object if it is locked.
104:             * 
105:             * @return
106:             * @throws DataAccessException
107:             */
108:            public User getLockOwner() throws DataAccessException;
109:
110:            /**
111:             * Reactivate historical object by creating a pending version.
112:             *
113:             * @throws EditException
114:             */
115:            public Editable reactivate() throws EditException;
116:
117:            /** Gets all of the unnaproved versions of this object.
118:             *
119:             * @return Vector All of the unapproved versions
120:             */
121:            public List getPendingVersions() throws DataAccessException;
122:
123:            /**
124:             * Returns the live/current version of this object.
125:             * 
126:             * @return live version
127:             */
128:            public Editable getLiveVersion() throws DataAccessException;
129:
130:            /**
131:             * Tests whether this object is a live/current version.
132:             * 
133:             * @return
134:             * @throws DataAccessException
135:             */
136:            public boolean isLiveVersion() throws DataAccessException;
137:
138:            /**
139:             * Returns all of the versions for this object.
140:             * 
141:             * @return
142:             * @throws DataAccessException
143:             */
144:            public List getAllVersions() throws DataAccessException;
145:
146:            /** 
147:             * Gets all of the historical versions of this object.
148:             * If this is an historical document, gets all of the versions that are older than this one
149:             *
150:             * @return Vector All of the historical versions
151:             */
152:            public List getHistoricalVersions() throws DataAccessException;
153:
154:            /** 
155:             * Returns the status of this object.
156:             *
157:             * @return int The current status
158:             */
159:            public Status getStatus() throws DataAccessException;
160:
161:            /**
162:             * Adds a listener to receive edit events when the object has been edited.
163:             * 
164:             * @param listener
165:             */
166:            public void addEditEventListener(EditEventListener listener);
167:
168:            /**
169:             * Removes a edit event listener.
170:             * 
171:             * @param listener
172:             */
173:            public void removeEditEventListener(EditEventListener listener);
174:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.