Esri Geoportal Server
1.0

com.esri.gpt.framework.security.metadata
Class MetadataAcl

java.lang.Object
  extended by com.esri.gpt.framework.security.metadata.MetadataAcl

public class MetadataAcl
extends Object

This class is used to metadata build access control lists.


Constructor Summary
MetadataAcl(RequestContext context)
          Constructor.
 
Method Summary
 String buildAclGroups(Groups groups, ArrayList<String> pickedGroups)
          Build list of selected groups
 boolean hasReadAccess(User user, String uuid)
          Indicates if the user has read access for the document with given UUID.
 boolean isPolicyUnrestricted()
          Indicates if the application metadata access policy is unrestricted.
 String[] makeDocumentAcl(String xml)
          Builds array of acl strings
 String makeGroupsfromXml(Groups groups, String xml)
          Returns groups from acl xml string
 String makeGroupsKeysfromXml(Groups groups, String xml)
          Makes group keys from XML string.
 String[] makeUserAcl()
          Builds array of acl strings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetadataAcl

public MetadataAcl(RequestContext context)
Constructor.

Parameters:
context - the active request context
Method Detail

buildAclGroups

public String buildAclGroups(Groups groups,
                             ArrayList<String> pickedGroups)
Build list of selected groups

Parameters:
groups - groups
pickedGroups - picked groups
Returns:
acl

hasReadAccess

public boolean hasReadAccess(User user,
                             String uuid)
                      throws SQLException,
                             ParserConfigurationException,
                             SAXException,
                             IOException
Indicates if the user has read access for the document with given UUID.

Parameters:
user - the application user
uuid - the document uuid
Returns:
true if the user has read access
Throws:
IOException
SAXException
ParserConfigurationException
SQLException

isPolicyUnrestricted

public boolean isPolicyUnrestricted()
Indicates if the application metadata access policy is unrestricted.

Returns:
true if the policy is unrestricted

makeDocumentAcl

public String[] makeDocumentAcl(String xml)
                         throws ParserConfigurationException,
                                SAXException,
                                IOException
Builds array of acl strings

Parameters:
xml - xml string
Returns:
document acl string array
Throws:
IOException
SAXException
ParserConfigurationException

makeGroupsfromXml

public String makeGroupsfromXml(Groups groups,
                                String xml)
                         throws ParserConfigurationException,
                                SAXException,
                                IOException
Returns groups from acl xml string

Parameters:
groups - group
xml - xml
Returns:
string representation of groups
Throws:
IOException
SAXException
ParserConfigurationException

makeGroupsKeysfromXml

public String makeGroupsKeysfromXml(Groups groups,
                                    String xml)
                             throws ParserConfigurationException,
                                    SAXException,
                                    IOException
Makes group keys from XML string.

Parameters:
groups - groups
xml - XML string
Returns:
string representation of groups
Throws:
ParserConfigurationException
SAXException
IOException

makeUserAcl

public String[] makeUserAcl()
Builds array of acl strings

Returns:
user acl string array
Throws:
SQLException
NamingException
IdentityException

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.