summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager/src/org/anjocaido/groupmanager/utils/PermissionCheckResult.java
diff options
context:
space:
mode:
authorsnowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-03-19 22:39:51 +0000
committersnowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-03-19 22:39:51 +0000
commita3ebd254f2897951a2ce31fdd90b6944c582d82b (patch)
tree11c8670882eed130d7ff1b33cc7c65e496f1bbac /EssentialsGroupManager/src/org/anjocaido/groupmanager/utils/PermissionCheckResult.java
parent487577f2fa856a61077594ad6677f0bdd7150fcd (diff)
downloadEssentials-a3ebd254f2897951a2ce31fdd90b6944c582d82b.tar
Essentials-a3ebd254f2897951a2ce31fdd90b6944c582d82b.tar.gz
Essentials-a3ebd254f2897951a2ce31fdd90b6944c582d82b.tar.lz
Essentials-a3ebd254f2897951a2ce31fdd90b6944c582d82b.tar.xz
Essentials-a3ebd254f2897951a2ce31fdd90b6944c582d82b.zip
Moving all files to trunk.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@969 e251c2fe-e539-e718-e476-b85c1f46cddb
Diffstat (limited to 'EssentialsGroupManager/src/org/anjocaido/groupmanager/utils/PermissionCheckResult.java')
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/utils/PermissionCheckResult.java66
1 files changed, 66 insertions, 0 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/utils/PermissionCheckResult.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/utils/PermissionCheckResult.java
new file mode 100644
index 000000000..3ee6fdf30
--- /dev/null
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/utils/PermissionCheckResult.java
@@ -0,0 +1,66 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.anjocaido.groupmanager.utils;
+
+import org.anjocaido.groupmanager.data.DataUnit;
+
+/**
+ *
+ * @author gabrielcouto
+ */
+public class PermissionCheckResult {
+ /**
+ * It should be the owner of the access level found.
+ *
+ * Use instanceof to find the owner type
+ */
+ public DataUnit owner;
+ /**
+ * The permission node found in the DataUnit.
+ */
+ public String accessLevel;
+ /**
+ * The full name of the permission you are looking for
+ */
+ public String askedPermission;
+ /**
+ * The result conclusion of the search.
+ * It determines if the owner can do, or not.
+ *
+ * It even determines if it has an owner.
+ */
+ public Type resultType = Type.NOTFOUND;
+
+ /**
+ * The type of result the search can give.
+ */
+ public enum Type {
+
+ /**
+ * If found a matching node starting with '+'.
+ * It means the user CAN do the permission.
+ */
+ EXCEPTION,
+ /**
+ * If found a matching node starting with '-'.
+ * It means the user CANNOT do the permission.
+ */
+ NEGATION,
+ /**
+ * If just found a common matching node.
+ * IT means the user CAN do the permission.
+ */
+ FOUND,
+ /**
+ * If no matchin node was found.
+ * It means the user CANNOT do the permission.
+ *
+ * owner field and accessLevel field should not be considered,
+ * when type is
+ * NOTFOUND
+ */
+ NOTFOUND
+ }
+}