mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-18 06:22:29 +00:00
adding more accessor methods.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6399 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
0b4cefeceb
commit
16fb103a93
1 file changed
+13
@@ -127,6 +127,15 @@ public final class Permission {
|
||||
return ALL_GROUPS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the {@link Group} whose {@link Group#owner} is the given class.
|
||||
*
|
||||
* @return null if not found.
|
||||
*/
|
||||
public static Group getGroup(Class owner) {
|
||||
return PERMISSIONS.get(owner);
|
||||
}
|
||||
|
||||
/**
|
||||
* All the permissions in the system, keyed by their owners.
|
||||
*/
|
||||
@@ -195,6 +204,10 @@ public final class Permission {
|
||||
public int compareTo(Group that) {
|
||||
return this.owner.getName().compareTo(that.owner.getName());
|
||||
}
|
||||
|
||||
public int size() {
|
||||
return permisisons.size();
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in new issue
Block a user