001: /*
002: * Copyright 2005-2007 The Kuali Foundation.
003: *
004: *
005: * Licensed under the Educational Community License, Version 1.0 (the "License");
006: * you may not use this file except in compliance with the License.
007: * You may obtain a copy of the License at
008: *
009: * http://www.opensource.org/licenses/ecl1.php
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: package edu.iu.uis.eden.actionlist;
018:
019: import java.io.Serializable;
020:
021: import edu.iu.uis.eden.actionitem.ActionItem;
022: import edu.iu.uis.eden.actions.ActionSet;
023: import edu.iu.uis.eden.clientapp.vo.ActionRequestVO;
024: import edu.iu.uis.eden.clientapp.vo.RouteHeaderVO;
025: import edu.iu.uis.eden.notes.CustomNoteAttribute;
026: import edu.iu.uis.eden.notes.Note;
027: import edu.iu.uis.eden.plugin.attributes.CustomActionListAttribute;
028: import edu.iu.uis.eden.plugin.attributes.CustomEmailAttribute;
029: import edu.iu.uis.eden.web.session.UserSession;
030:
031: public class TestCustomActionList implements CustomActionListAttribute,
032: Serializable, CustomEmailAttribute, CustomNoteAttribute {
033:
034: private static final long serialVersionUID = -7212208304658959134L;
035:
036: private RouteHeaderVO routeHeaderVO;
037: private ActionRequestVO actionRequestVO;
038: private UserSession userSession;
039:
040: public TestCustomActionList() {
041: }
042:
043: public boolean isAuthorizedToAddNotes() throws Exception {
044: return true;
045: }
046:
047: public boolean isAuthorizedToEditNote(Note note) throws Exception {
048: return true;
049: }
050:
051: public String getCustomEmailBody() throws Exception {
052: return "This is a test. This is a Customized Email Body. This is a Customized Email Body. This is a Customized Email Body. This is a Customized Email Body. This is a Customized Email Body."
053: + " This is a Customized Email Body. This is a Customized Email Body. This is a Customized Email Body. This is a Customized Email Body. This is a Customized Email Body. This is a Customized Email Body."
054: + " This is a Customized Email Body. This is a Customized Email Body. This is a Customized Email Body. This is a Customized Email Body. This is a Customized Email Body. This is a Customized Email Body.";
055: }
056:
057: public String getCustomEmailSubject() throws Exception {
058: return "Customized Email Subject";
059: }
060:
061: public ActionSet getLegalActions(UserSession userSession,
062: ActionItem actionItem) throws Exception {
063: ActionSet actionSet = new ActionSet();
064: actionSet.addAcknowledge();
065: actionSet.addApprove();
066: actionSet.addCancel();
067: actionSet.addDisapprove();
068: return actionSet;
069: }
070:
071: public DisplayParameters getDocHandlerDisplayParameters(
072: UserSession userSession, ActionItem actionItem)
073: throws Exception {
074: return new DisplayParameters(new Integer(300));
075: }
076:
077: public RouteHeaderVO getRouteHeaderVO() {
078: return routeHeaderVO;
079: }
080:
081: public void setRouteHeaderVO(RouteHeaderVO routeHeaderVO) {
082: this .routeHeaderVO = routeHeaderVO;
083: }
084:
085: public ActionRequestVO getActionRequestVO() {
086: return actionRequestVO;
087: }
088:
089: public void setActionRequestVO(ActionRequestVO actionRequestVO) {
090: this .actionRequestVO = actionRequestVO;
091: }
092:
093: public UserSession getUserSession() {
094: return userSession;
095: }
096:
097: public void setUserSession(UserSession userSession) {
098: this.userSession = userSession;
099: }
100:
101: }
|