|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface Usecase
Usecase interface.
| Field Summary | |
|---|---|
static java.lang.String |
ROLE
The Usecase role. |
| Method Summary | |
|---|---|
void |
advance()
Advances the usecase to the next step. |
void |
cancel()
Cancels the usecase. |
void |
checkExecutionConditions()
Checks the conditions right before the operation is executed. |
void |
checkPostconditions()
Checks the conditions after the usecase was executed. |
void |
checkPreconditions()
Checks the conditions before a form is displayed. |
void |
execute()
Executes the usecase. |
java.util.List |
getErrorMessages()
Returns the error messages from the previous operation. |
java.util.List |
getInfoMessages()
Returns the info messages from the previous operation. |
java.lang.String |
getName()
|
java.lang.Object |
getParameter(java.lang.String name)
Returns the current value of a parameter. |
java.lang.Object |
getParameter(java.lang.String name,
java.lang.Object defaultValue)
Returns the current value of a parameter. |
java.lang.String |
getParameterAsString(java.lang.String name)
Returns the current value of a parameter as a string. |
java.lang.String[] |
getParameterNames()
|
org.apache.cocoon.servlet.multipart.Part |
getPart(java.lang.String name)
Returns the current value of a part parameter as a string. |
org.apache.lenya.cms.repository.Session |
getSession()
|
java.lang.String |
getSourceURL()
|
java.lang.String |
getTargetURL(boolean success)
Returns the webapp URL which should be redirected to after the usecase is completed. |
UsecaseView |
getView()
|
boolean |
hasErrors()
Determine if the usecase has error messages. |
boolean |
hasInfoMessages()
Determine if the usecase has info messages. |
boolean |
isOptimistic()
|
void |
lockInvolvedObjects()
Locks all objects that are involved in the transaction. |
void |
setName(java.lang.String name)
|
void |
setParameter(java.lang.String name,
java.lang.Object value)
Sets a parameter from the form. |
void |
setPart(java.lang.String name,
org.apache.cocoon.servlet.multipart.Part value)
Sets a parameter from the form. |
void |
setSourceURL(java.lang.String url)
|
void |
setTestSession(org.apache.lenya.cms.repository.Session session)
If you invoke this method, the usecase won't use its own isolated session, but the passed test session. |
void |
setView(UsecaseView view)
|
| Field Detail |
|---|
static final java.lang.String ROLE
Usecase role.
| Method Detail |
|---|
void setSourceURL(java.lang.String url)
url - The URL the usecase is invoked on.
void setParameter(java.lang.String name,
java.lang.Object value)
name - The parameter name.value - The parameter value.java.lang.Object getParameter(java.lang.String name)
name - The parameter name.
java.lang.Object getParameter(java.lang.String name,
java.lang.Object defaultValue)
name - The parameter name.defaultValue - The default value to return if the parameter is not set.
java.lang.String getParameterAsString(java.lang.String name)
name - The parameter name.
null if the parameter was not set.java.lang.String[] getParameterNames()
void setPart(java.lang.String name,
org.apache.cocoon.servlet.multipart.Part value)
name - The parameter name.value - The parameter value.org.apache.cocoon.servlet.multipart.Part getPart(java.lang.String name)
name - The part parameter name.
null if the part was not set.
void advance()
throws UsecaseException
UsecaseException - if an error occurs.
void checkPreconditions()
throws UsecaseException
UsecaseException - if an error occurs that causes an unstable
system.
void checkPostconditions()
throws UsecaseException
UsecaseException - if an error occurs that causes an unstable
system.
void checkExecutionConditions()
throws UsecaseException
UsecaseException - if an error occurs that causes an unstable
system.
void lockInvolvedObjects()
throws UsecaseException
UsecaseException - if an error occurs.java.util.List getErrorMessages()
UsecaseMessage objects.java.util.List getInfoMessages()
UsecaseMessage objects.boolean hasErrors()
boolean hasInfoMessages()
void execute()
throws UsecaseException
UsecaseException - if an error occured that causes an unstable
system.
void cancel()
throws UsecaseException
UsecaseException - if an error occurs.java.lang.String getSourceURL()
java.lang.String getTargetURL(boolean success)
success - If the usecase was completed successfully.
void setName(java.lang.String name)
name - The name of this usecase.java.lang.String getName()
UsecaseView getView()
void setView(UsecaseView view)
view - The view of the usecase.org.apache.lenya.cms.repository.Session getSession()
void setTestSession(org.apache.lenya.cms.repository.Session session)
session - The test session.boolean isOptimistic()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||