Style Intelligence v12.0

inetsoft.sree.security
Class Permission

java.lang.Object
  extended by inetsoft.sree.security.Permission
All Implemented Interfaces:
inetsoft.util.XMLSerializable, Serializable, Cloneable

public class Permission
extends Object
implements Serializable, Cloneable, inetsoft.util.XMLSerializable

Default implementation of permission. A permission contains list of users and roles with permission to read, write, or delete.

See Also:
Serialized Form

Constructor Summary
Permission()
           
 
Method Summary
 boolean check(inetsoft.uql.util.Identity identity, char acc)
          Check the if an identity is on the permission list.
 boolean check(String name, char acc, int type)
          Check the if an identity is on the permission list.
 boolean checkGroup(String name, char acc)
          Check the if an role is on the permission list.
 boolean checkRole(String name, char acc)
          Check the if an role is on the permission list.
 boolean checkUser(String name, char acc)
          Check the if an user is on the permission list.
 Object clone()
           
 boolean equals(Object obj)
          Check if two permission setting is equals.
 String[] getDeleteGroups()
          Get a list of groups that have delete permission.
 String[] getDeleteRoles()
          Get a list of roles that have delete permission.
 String[] getDeleteUsers()
          Get a list of users that have delete permission.
 String[] getReadGroups()
          Get a list of groups that have read permission.
 String[] getReadRoles()
          Get a list of roles that have read permission.
 String[] getReadUsers()
          Get a list of users that have read permission.
 String[] getWriteGroups()
          Get a list of groups that have write permission.
 String[] getWriteRoles()
          Get a list of roles that have write permission.
 String[] getWriteUsers()
          Get a list of users that have write permission.
 boolean isBlank()
          Check if a permission setting is blank.
 void parseXML(Element tag)
          Method to parse an xml segment.
 void setDeleteGroups(String[] groups)
          Get a list of groups that have delete permission.
 void setDeleteRoles(String[] roles)
          Set the roles that have delete permission.
 void setDeleteUsers(String[] users)
          Set the users that have delete permission.
 void setReadGroups(String[] groups)
          Set the groups that have read permission.
 void setReadRoles(String[] roles)
          Set the roles that have read permission.
 void setReadUsers(String[] users)
          Set the users that have read permission.
 void setWriteGroups(String[] groups)
          Set the groups that have write permission.
 void setWriteRoles(String[] roles)
          Set the roles that have write permission.
 void setWriteUsers(String[] users)
          Set the users that have write permission.
 String toString()
           
 void writeXML(PrintWriter writer)
          Write the xml segment to print writer.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Permission

public Permission()
Method Detail

setReadUsers

public void setReadUsers(String[] users)
Set the users that have read permission.


getReadUsers

public String[] getReadUsers()
Get a list of users that have read permission.


setReadRoles

public void setReadRoles(String[] roles)
Set the roles that have read permission.


getReadRoles

public String[] getReadRoles()
Get a list of roles that have read permission.


setReadGroups

public void setReadGroups(String[] groups)
Set the groups that have read permission.


getReadGroups

public String[] getReadGroups()
Get a list of groups that have read permission.


setWriteUsers

public void setWriteUsers(String[] users)
Set the users that have write permission.


getWriteUsers

public String[] getWriteUsers()
Get a list of users that have write permission.


setWriteRoles

public void setWriteRoles(String[] roles)
Set the roles that have write permission.


getWriteRoles

public String[] getWriteRoles()
Get a list of roles that have write permission.


setWriteGroups

public void setWriteGroups(String[] groups)
Set the groups that have write permission.


getWriteGroups

public String[] getWriteGroups()
Get a list of groups that have write permission.


setDeleteUsers

public void setDeleteUsers(String[] users)
Set the users that have delete permission.


getDeleteUsers

public String[] getDeleteUsers()
Get a list of users that have delete permission.


setDeleteRoles

public void setDeleteRoles(String[] roles)
Set the roles that have delete permission.


getDeleteRoles

public String[] getDeleteRoles()
Get a list of roles that have delete permission.


getDeleteGroups

public String[] getDeleteGroups()
Get a list of groups that have delete permission.


setDeleteGroups

public void setDeleteGroups(String[] groups)
Get a list of groups that have delete permission.


checkUser

public boolean checkUser(String name,
                         char acc)
Check the if an user is on the permission list.

Parameters:
name - user name.
acc - access right, 'r', 'w', or 'd'.

check

public boolean check(inetsoft.uql.util.Identity identity,
                     char acc)
Check the if an identity is on the permission list.


check

public boolean check(String name,
                     char acc,
                     int type)
Check the if an identity is on the permission list.

Parameters:
name - identity name.
acc - access right, 'r', 'w', or 'd'.
type - identity type.

checkRole

public boolean checkRole(String name,
                         char acc)
Check the if an role is on the permission list.

Parameters:
name - role name.
acc - access right, 'r', 'w', or 'd'.

checkGroup

public boolean checkGroup(String name,
                          char acc)
Check the if an role is on the permission list.

Parameters:
name - role name.
acc - access right, 'r', 'w', or 'd'.

clone

public Object clone()
Overrides:
clone in class Object

toString

public String toString()
Overrides:
toString in class Object

isBlank

public boolean isBlank()
Check if a permission setting is blank.


equals

public boolean equals(Object obj)
Check if two permission setting is equals.

Overrides:
equals in class Object

writeXML

public void writeXML(PrintWriter writer)
Write the xml segment to print writer.

Specified by:
writeXML in interface inetsoft.util.XMLSerializable
Parameters:
writer - the destination print writer.

parseXML

public void parseXML(Element tag)
              throws Exception
Method to parse an xml segment.

Specified by:
parseXML in interface inetsoft.util.XMLSerializable
Throws:
Exception

Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.