KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > repo > action > ActionConditionImpl


1 /*
2  * Copyright (C) 2005 Alfresco, Inc.
3  *
4  * Licensed under the Mozilla Public License version 1.1
5  * with a permitted attribution clause. You may obtain a
6  * copy of the License at
7  *
8  * http://www.alfresco.org/legal/license.txt
9  *
10  * Unless required by applicable law or agreed to in writing,
11  * software distributed under the License is distributed on an
12  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13  * either express or implied. See the License for the specific
14  * language governing permissions and limitations under the
15  * License.
16  */

17 package org.alfresco.repo.action;
18
19 import java.io.Serializable JavaDoc;
20 import java.util.Map JavaDoc;
21
22 import org.alfresco.service.cmr.action.ActionCondition;
23
24 /**
25  * @author Roy Wetherall
26  */

27 public class ActionConditionImpl extends ParameterizedItemImpl implements Serializable JavaDoc,
28         ActionCondition
29 {
30     /**
31      * Serial version UID
32      */

33     private static final long serialVersionUID = 3257288015402644020L;
34     
35     /**
36      * Rule condition defintion
37      */

38     private String JavaDoc actionConditionDefinitionName;
39     
40     /**
41      * Indicates whether the result of the condition should have the NOT logical operator applied
42      * to it.
43      */

44     private boolean invertCondition = false;
45
46     /**
47      * Constructor
48      */

49     public ActionConditionImpl(String JavaDoc id, String JavaDoc actionConditionDefinitionName)
50     {
51         this(id, actionConditionDefinitionName, null);
52     }
53
54     /**
55      * @param parameterValues
56      */

57     public ActionConditionImpl(
58             String JavaDoc id,
59             String JavaDoc actionConditionDefinitionName,
60             Map JavaDoc<String JavaDoc, Serializable JavaDoc> parameterValues)
61     {
62         super(id, parameterValues);
63         this.actionConditionDefinitionName = actionConditionDefinitionName;
64     }
65
66     /**
67      * @see org.alfresco.service.cmr.action.ActionCondition#getActionConditionDefinitionName()
68      */

69     public String JavaDoc getActionConditionDefinitionName()
70     {
71         return this.actionConditionDefinitionName;
72     }
73     
74     /**
75      * @see org.alfresco.service.cmr.action.ActionCondition#setInvertCondition(boolean)
76      */

77     public void setInvertCondition(boolean invertCondition)
78     {
79         this.invertCondition = invertCondition;
80     }
81     
82     /**
83      * @see org.alfresco.service.cmr.action.ActionCondition#getInvertCondition()
84      */

85     public boolean getInvertCondition()
86     {
87         return this.invertCondition;
88     }
89 }
90
Popular Tags