Source Code Cross Referenced for Usecase.java in  » Content-Management-System » apache-lenya-2.0 » org » apache » lenya » cms » usecase » 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 » apache lenya 2.0 » org.apache.lenya.cms.usecase 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         *  contributor license agreements.  See the NOTICE file distributed with
004:         *  this work for additional information regarding copyright ownership.
005:         *  The ASF licenses this file to You under the Apache License, Version 2.0
006:         *  (the "License"); you may not use this file except in compliance with
007:         *  the License.  You may obtain a copy of the License at
008:         *
009:         *      http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         *  Unless required by applicable law or agreed to in writing, software
012:         *  distributed under the License is distributed on an "AS IS" BASIS,
013:         *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         *  See the License for the specific language governing permissions and
015:         *  limitations under the License.
016:         *
017:         */
018:        package org.apache.lenya.cms.usecase;
019:
020:        import java.util.List;
021:
022:        import org.apache.cocoon.servlet.multipart.Part;
023:        import org.apache.lenya.cms.repository.Session;
024:
025:        /**
026:         * Usecase interface.
027:         * 
028:         * @version $Id: Usecase.java 568271 2007-08-21 20:49:18Z andreas $
029:         */
030:        public interface Usecase {
031:
032:            /**
033:             * The <code>Usecase</code> role.
034:             */
035:            String ROLE = Usecase.class.getName();
036:
037:            /**
038:             * @param url The URL the usecase is invoked on.
039:             */
040:            void setSourceURL(String url);
041:
042:            /**
043:             * Sets a parameter from the form.
044:             * @param name The parameter name.
045:             * @param value The parameter value.
046:             */
047:            void setParameter(String name, Object value);
048:
049:            /**
050:             * Returns the current value of a parameter.
051:             * @param name The parameter name.
052:             * @return An object.
053:             */
054:            Object getParameter(String name);
055:
056:            /**
057:             * Returns the current value of a parameter.
058:             * @param name The parameter name.
059:             * @param defaultValue The default value to return if the parameter is not set.
060:             * @return An object.
061:             */
062:            Object getParameter(String name, Object defaultValue);
063:
064:            /**
065:             * Returns the current value of a parameter as a string.
066:             * @param name The parameter name.
067:             * @return A string or <code>null</code> if the parameter was not set.
068:             */
069:            String getParameterAsString(String name);
070:
071:            /**
072:             * @return The parameter names.
073:             */
074:            String[] getParameterNames();
075:
076:            /**
077:             * Sets a parameter from the form. This method is called for parts in
078:             * multipart requests.
079:             * @param name The parameter name.
080:             * @param value The parameter value.
081:             */
082:            void setPart(String name, Part value);
083:
084:            /**
085:             * Returns the current value of a part parameter as a string.
086:             * @param name The part parameter name.
087:             * @return A part or <code>null</code> if the part was not set.
088:             */
089:            Part getPart(String name);
090:
091:            /**
092:             * Advances the usecase to the next step. This method is called when all
093:             * parameters are set.
094:             * @throws UsecaseException if an error occurs.
095:             */
096:            void advance() throws UsecaseException;
097:
098:            /**
099:             * Checks the conditions before a form is displayed.
100:             * @throws UsecaseException if an error occurs that causes an unstable
101:             *             system.
102:             */
103:            void checkPreconditions() throws UsecaseException;
104:
105:            /**
106:             * Checks the conditions after the usecase was executed.
107:             * @throws UsecaseException if an error occurs that causes an unstable
108:             *             system.
109:             */
110:            void checkPostconditions() throws UsecaseException;
111:
112:            /**
113:             * Checks the conditions right before the operation is executed.
114:             * @throws UsecaseException if an error occurs that causes an unstable
115:             *             system.
116:             */
117:            void checkExecutionConditions() throws UsecaseException;
118:
119:            /**
120:             * Locks all objects that are involved in the transaction.
121:             * @throws UsecaseException if an error occurs.
122:             */
123:            void lockInvolvedObjects() throws UsecaseException;
124:
125:            /**
126:             * Returns the error messages from the previous operation. Error messages
127:             * prevent the operation from being executed.
128:             * @return A list of {@link UsecaseMessage} objects.
129:             */
130:            List getErrorMessages();
131:
132:            /**
133:             * Returns the info messages from the previous operation. Info messages do
134:             * not prevent the operation from being executed.
135:             * @return A list of {@link UsecaseMessage} objects.
136:             */
137:            List getInfoMessages();
138:
139:            /**
140:             * Determine if the usecase has error messages.
141:             * Provides a way of checking for errors without actually retrieving them.
142:             * @return true if the usecase resulted in error messages.
143:             */
144:            public boolean hasErrors();
145:
146:            /**
147:             * Determine if the usecase has info messages.
148:             * Provides a way of checking for info messages without actually retrieving them.
149:             * @return true if the usecase resulted in info messages being generated.
150:             */
151:            public boolean hasInfoMessages();
152:
153:            /**
154:             * Executes the usecase. During this method error and info messages are
155:             * filled in. If getErrorMessages() returns an empty array, the operation
156:             * succeeded. Otherwise, the operation failed.
157:             * @throws UsecaseException if an error occured that causes an unstable
158:             *             system.
159:             */
160:            void execute() throws UsecaseException;
161:
162:            /**
163:             * Cancels the usecase.
164:             * @throws UsecaseException if an error occurs.
165:             */
166:            void cancel() throws UsecaseException;
167:
168:            /**
169:             * @return The web application URL the usecase was invoked on.
170:             */
171:            String getSourceURL();
172:
173:            /**
174:             * Returns the webapp URL which should be redirected to after the usecase is
175:             * completed.
176:             * @param success If the usecase was completed successfully.
177:             * @return A web application URL.
178:             */
179:            String getTargetURL(boolean success);
180:
181:            /**
182:             * @param name The name of this usecase.
183:             */
184:            void setName(String name);
185:
186:            /**
187:             * @return The name of this usecase.
188:             */
189:            String getName();
190:
191:            /**
192:             * @return The view of the usecase.
193:             */
194:            UsecaseView getView();
195:
196:            /**
197:             * @param view The view of the usecase.
198:             */
199:            void setView(UsecaseView view);
200:
201:            /**
202:             * @return The repository session.
203:             */
204:            Session getSession();
205:
206:            /**
207:             * If you invoke this method, the usecase won't use its own isolated session,
208:             * but the passed test session. The session will not be committed when the usecase
209:             * is invoked, so you can check it for modifications without modifying the repository.
210:             * @param session The test session.
211:             */
212:            void setTestSession(Session session);
213:
214:            /**
215:             * @return if the usecase uses optimistic offline lock.
216:             */
217:            boolean isOptimistic();
218:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.