incubator-hise-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r.@apache.org
Subject svn commit: r966647 - /incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/PotentialDelegates.java
Date Thu, 22 Jul 2010 13:32:44 GMT
Author: rr
Date: Thu Jul 22 13:32:44 2010
New Revision: 966647

URL: http://svn.apache.org/viewvc?rev=966647&view=rev
Log:
HISE-51: Implement task delegation (Thanks to Michał Więcław)

Added:
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/PotentialDelegates.java

Added: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/PotentialDelegates.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/PotentialDelegates.java?rev=966647&view=auto
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/PotentialDelegates.java
(added)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/PotentialDelegates.java
Thu Jul 22 13:32:44 2010
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hise.dao;
+
+import org.apache.hise.lang.xsd.htd.TPotentialDelegatees;
+
+/**
+ * Potential Delegates
+ * 
+ * @author Michał Więcław
+ */
+public enum PotentialDelegates {
+	
+	/**
+	 * It is allowed to delegate the task to anybody
+	 */
+	ANYBODY,
+	
+	/**
+	 * It is allowed to delegate the task to potential owners previously selected
+	 */
+	POTENTIAL_OWNERS,
+	
+	/**
+	 * It is allowed to delegate the task to other people, e.g. authorized owners
+	 */
+	OTHER,
+	
+	/**
+	 * It is not allowed to delegate the task.
+	 */
+	NOBODY;
+	
+	static public PotentialDelegates mapFromTPotentalDelegates(TPotentialDelegatees delegatees)
+	{
+		if(delegatees.equals(TPotentialDelegatees.ANYBODY)) return ANYBODY;
+		if(delegatees.equals(TPotentialDelegatees.POTENTIAL_OWNERS)) return POTENTIAL_OWNERS;
+		if(delegatees.equals(TPotentialDelegatees.OTHER)) return OTHER;
+		return NOBODY;
+	}
+}



Mime
View raw message