Esri Geoportal Server
1.0

com.esri.gpt.server.assertion.components
Class AsnAuthorizer

java.lang.Object
  extended by com.esri.gpt.server.assertion.components.AsnAuthorizer

public class AsnAuthorizer
extends Object

Handles authorization requests for an assertion operation.


Constructor Summary
AsnAuthorizer()
          Default constructor.
 
Method Summary
 void authorizeCreate(AsnContext context, Assertion assertion)
          Authorizes a create operation.
 void authorizeDelete(AsnContext context, Assertion assertion)
          Authorizes a delete operation.
 void authorizeDisable(AsnContext context, Assertion assertion)
          Authorizes a disable operation.
 void authorizeEnable(AsnContext context, Assertion assertion)
          Authorizes an enable operation.
 void authorizeQuery(AsnContext context)
          Authorizes a query based operation.
 void authorizeUpdate(AsnContext context, Assertion assertion)
          Authorizes an update operation.
 boolean canCreate(AsnContext context, AsnAuthPolicy policy)
          Determines if the user can create an assertion.
 boolean canDelete(AsnContext context, AsnAuthPolicy policy, Assertion assertion)
          Determines if a the action user can delete an assertion.
 boolean canDisable(AsnContext context, AsnAuthPolicy policy, Assertion assertion)
          Determines if a the action user can disable an assertion.
 boolean canEnable(AsnContext context, AsnAuthPolicy policy, Assertion assertion)
          Determines if a the action user can create an assertion.
 boolean canQuery(AsnContext context, AsnAuthPolicy policy)
          Determines if the user can query assertions.
 boolean canUpdate(AsnContext context, AsnAuthPolicy policy, Assertion assertion)
          Determines if a the action user can update an assertion.
 void establishUser(AsnContext context)
          Establishes the user associated with the operation.
 boolean getWasUserEstablished()
          Gets the flag indicating whether or not the user was established.
 void setWasUserEstablished(boolean wasUserEstablished)
          Sets the flag indicating whether or not the user was established.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsnAuthorizer

public AsnAuthorizer()
Default constructor.

Method Detail

getWasUserEstablished

public boolean getWasUserEstablished()
Gets the flag indicating whether or not the user was established.

Returns:
true if the user was established

setWasUserEstablished

public void setWasUserEstablished(boolean wasUserEstablished)
Sets the flag indicating whether or not the user was established.

Parameters:
wasUserEstablished - true if the user was established

authorizeCreate

public void authorizeCreate(AsnContext context,
                            Assertion assertion)
                     throws NotAuthorizedException,
                            CatalogIndexException,
                            AsnInsufficientPrivilegeException
Authorizes a create operation.

Parameters:
context - the assertion operation context assertion the active assertion
Throws:
NotAuthorizedException - if authentication was required
CatalogIndexException - indicates an I/O error with the resource index
AsnInsufficientPrivilegeException - if the user has insufficient privilege

authorizeDelete

public void authorizeDelete(AsnContext context,
                            Assertion assertion)
                     throws NotAuthorizedException,
                            CatalogIndexException,
                            AsnInsufficientPrivilegeException
Authorizes a delete operation.

Parameters:
context - the assertion operation context
assertion - the active assertion
Throws:
NotAuthorizedException - if authentication was required
CatalogIndexException - indicates an I/O error with the resource index
AsnInsufficientPrivilegeException - if the user has insufficient privilege

authorizeDisable

public void authorizeDisable(AsnContext context,
                             Assertion assertion)
                      throws NotAuthorizedException,
                             CatalogIndexException,
                             AsnInsufficientPrivilegeException
Authorizes a disable operation.

Parameters:
context - the assertion operation context
assertion - the active assertion
Throws:
NotAuthorizedException - if authentication was required
CatalogIndexException - indicates an I/O error with the resource index
AsnInsufficientPrivilegeException - if the user has insufficient privilege

authorizeEnable

public void authorizeEnable(AsnContext context,
                            Assertion assertion)
                     throws NotAuthorizedException,
                            CatalogIndexException,
                            AsnInsufficientPrivilegeException
Authorizes an enable operation.

Parameters:
context - the assertion operation context
assertion - the active assertion
Throws:
NotAuthorizedException - if authentication was required
CatalogIndexException - indicates an I/O error with the resource index
AsnInsufficientPrivilegeException - if the user has insufficient privilege

authorizeQuery

public void authorizeQuery(AsnContext context)
                    throws NotAuthorizedException,
                           CatalogIndexException,
                           AsnInsufficientPrivilegeException
Authorizes a query based operation.

Parameters:
context - the assertion operation context
Throws:
NotAuthorizedException - if authentication was required
CatalogIndexException - indicates an I/O error with the resource index
AsnInsufficientPrivilegeException - if the user has insufficient privilege

authorizeUpdate

public void authorizeUpdate(AsnContext context,
                            Assertion assertion)
                     throws NotAuthorizedException,
                            CatalogIndexException,
                            AsnInsufficientPrivilegeException
Authorizes an update operation.

Parameters:
context - the assertion operation context
assertion - the active assertion
Throws:
NotAuthorizedException - if authentication was required
CatalogIndexException - indicates an I/O error with the resource index
AsnInsufficientPrivilegeException - if the user has insufficient privilege

canCreate

public boolean canCreate(AsnContext context,
                         AsnAuthPolicy policy)
Determines if the user can create an assertion.

Parameters:
context - the assertion operation context
policy - the authorization policy
Returns:
true if the user can perform the action

canDelete

public boolean canDelete(AsnContext context,
                         AsnAuthPolicy policy,
                         Assertion assertion)
Determines if a the action user can delete an assertion.

Parameters:
context - the assertion operation context
policy - the authorization policy
assertion - the active assertion
Returns:
true if the user can perform the action

canDisable

public boolean canDisable(AsnContext context,
                          AsnAuthPolicy policy,
                          Assertion assertion)
Determines if a the action user can disable an assertion.

Parameters:
context - the assertion operation context
policy - the authorization policy
assertion - the active assertion
Returns:
true if the user can perform the action

canEnable

public boolean canEnable(AsnContext context,
                         AsnAuthPolicy policy,
                         Assertion assertion)
Determines if a the action user can create an assertion.

Parameters:
context - the assertion operation context
policy - the authorization policy
assertion - the active assertion
Returns:
true if the user can perform the action

canQuery

public boolean canQuery(AsnContext context,
                        AsnAuthPolicy policy)
Determines if the user can query assertions.

Parameters:
context - the assertion operation context
policy - the authorization policy
Returns:
true if the user can perform the action

canUpdate

public boolean canUpdate(AsnContext context,
                         AsnAuthPolicy policy,
                         Assertion assertion)
Determines if a the action user can update an assertion.

Parameters:
context - the assertion operation context
policy - the authorization policy
assertion - the active assertion
Returns:
true if the user can perform the action

establishUser

public void establishUser(AsnContext context)
                   throws NotAuthorizedException,
                          AsnUnestablishedUserException
Establishes the user associated with the operation.

Parameters:
context - the assertion operation context
Throws:
NotAuthorizedException - if authentication was required
AsnInsufficientPrivilegeException - if the user has insufficient privilege
AsnUnestablishedUserException - if the user could not be established

Esri Geoportal Server
1.0

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