KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > lenya > cms > workflow > CMSSituation


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */

17
18 /* $Id: CMSSituation.java 42598 2004-03-01 16:18:28Z gregor $ */
19
20 package org.apache.lenya.cms.workflow;
21
22 import org.apache.lenya.workflow.Situation;
23
24 public class CMSSituation implements Situation {
25
26     /**
27      * Returns the machine IP address.
28      * @return A string.
29      */

30     public String JavaDoc getMachineIp() {
31         return machineIp;
32     }
33
34     /**
35      * Returns the user ID.
36      * @return A string.
37      */

38     public String JavaDoc getUserId() {
39         return userId;
40     }
41
42     /**
43      * Creates a new instance of Situation
44      * @param roleIds The role IDs.
45      * @param userId The user ID.
46      * @param machineIp The machine IP address.
47      */

48     protected CMSSituation(String JavaDoc[] roleIds, String JavaDoc userId, String JavaDoc machineIp) {
49         this.roleIds = roleIds;
50         this.userId = userId;
51         this.machineIp = machineIp;
52     }
53
54     private String JavaDoc[] roleIds;
55
56     /**
57      * Get the roles
58      *
59      * @return the roles
60      */

61     public String JavaDoc[] getRoleIds() {
62         return roleIds;
63     }
64
65     /** (non-Javadoc)
66      * @see java.lang.Object#toString()
67      */

68     public String JavaDoc toString() {
69         return "(roles: " + roleIds + ")";
70     }
71     
72     private String JavaDoc userId;
73     private String JavaDoc machineIp;
74     
75 }
76
Popular Tags