001: /*
002: * Copyright 2005-2006 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.user.web;
018:
019: import org.apache.struts.action.ActionForm;
020:
021: import edu.iu.uis.eden.EdenConstants;
022: import edu.iu.uis.eden.KEWServiceLocator;
023: import edu.iu.uis.eden.user.AuthenticationUserId;
024: import edu.iu.uis.eden.user.EmplId;
025: import edu.iu.uis.eden.user.UuId;
026: import edu.iu.uis.eden.user.WorkflowUserId;
027: import edu.iu.uis.eden.util.Utilities;
028:
029: /**
030: * A Struts ActionForm for the {@link WorkflowUserAction}.
031: *
032: * @author ewestfal
033: */
034: public class WorkflowUserForm extends ActionForm {
035:
036: private WebWorkflowUser existingUser;
037: private WebWorkflowUser user;
038: private String methodToCall = "";
039: private String showEdit = "no";
040:
041: public WorkflowUserForm() {
042: user = new WebWorkflowUser(KEWServiceLocator.getUserService()
043: .getBlankUser());
044: }
045:
046: public String getInstructionForCreateNew() {
047: return Utilities
048: .getApplicationConstant(EdenConstants.USER_CREATE_NEW_INSTRUCTION_KEY);
049: }
050:
051: public WebWorkflowUser getUser() {
052: return user;
053: }
054:
055: public void setUser(WebWorkflowUser user) {
056: this .user = user;
057: }
058:
059: public String getExistingWorkflowId() {
060: return existingUser.getWorkflowUserId().getWorkflowId();
061: }
062:
063: public String getWorkflowId() {
064: return user.getWorkflowUserId().getWorkflowId();
065: }
066:
067: public void setWorkflowId(String workflowId) {
068: user.setWorkflowUserId(new WorkflowUserId(workflowId));
069: }
070:
071: public String getShowEdit() {
072: return showEdit;
073: }
074:
075: public void setShowEdit(String showEdit) {
076: this .showEdit = showEdit;
077: }
078:
079: public WebWorkflowUser getExistingUser() {
080: return existingUser;
081: }
082:
083: public void setExistingUser(WebWorkflowUser existingUser) {
084: this .existingUser = existingUser;
085: }
086:
087: public String getMethodToCall() {
088: return methodToCall;
089: }
090:
091: public void setMethodToCall(String methodToCall) {
092: this .methodToCall = methodToCall;
093: }
094:
095: public String getExistingAuthenticationId() {
096: return existingUser.getAuthenticationUserId()
097: .getAuthenticationId();
098: }
099:
100: public String getAuthenticationId() {
101: return user.getAuthenticationUserId().getAuthenticationId();
102: }
103:
104: public void setAuthenticationId(String authenticationId) {
105: user.setAuthenticationUserId(new AuthenticationUserId(
106: authenticationId));
107: }
108:
109: public String getExistingEmplId() {
110: return existingUser.getEmplId().getEmplId();
111: }
112:
113: public String getEmplId() {
114: return user.getEmplId().getEmplId();
115: }
116:
117: public void setEmplId(String emplId) {
118: user.setEmplId(new EmplId(emplId));
119: }
120:
121: public String getExistingUuId() {
122: return existingUser.getUuId().getUuId();
123: }
124:
125: public String getUuId() {
126: return user.getUuId().getUuId();
127: }
128:
129: public void setUuId(String uuId) {
130: user.setUuId(new UuId(uuId));
131: }
132:
133: }
|