Esri Geoportal Server
1.0

com.esri.gpt.framework.security.principal
Class Publisher

java.lang.Object
  extended by com.esri.gpt.framework.security.principal.SecurityPrincipal
      extended by com.esri.gpt.framework.security.principal.User
          extended by com.esri.gpt.framework.security.principal.Publisher

public class Publisher
extends User

Represents a user with a metadata publishing role.


Constructor Summary
protected Publisher()
          Default constructor.
  Publisher(RequestContext context)
          Constructs a publisher based upon the user associated with the current request context.
  Publisher(RequestContext context, String userDN)
          Constructs a publisher based upon the user associated with the current request context and a distinguished name on behalf of which a document will be published.
 
Method Summary
static Groups buildSelectableGroups(RequestContext context)
          Builds a collection of groups that can be selected by the current user to set access policy
static Users buildSelectablePublishers(RequestContext context, boolean forManagement)
          Builds a collection of publishers (users) that can be selected by the current user.
 String getDefaultFolderName()
          Gets the default folder name for this publisher.
 String getFolderUuid()
          Gets the folder uuid for this publisher.
 boolean getIsAdministrator()
          Gets the status indicating whether this publisher is an administrator.
 boolean getIsRemote()
          Gets the status indicating whether this publisher exists within a remote identity store.
static Publisher makeSystemAdministrator(RequestContext context)
          Creates a catalog administrator based upon the distinguished name credential supplied within the GPT configuration file (@catalogAdminDN).
 void setFolderUuid(String folderUuid)
          Sets the folder uuid for this publisher.
 
Methods inherited from class com.esri.gpt.framework.security.principal.User
getAuthenticationStatus, getCredentials, getGroups, getName, getProfile, reset, setAuthenticationStatus, setCredentials, setGroups, setProfile
 
Methods inherited from class com.esri.gpt.framework.security.principal.SecurityPrincipal
getDistinguishedName, getKey, getLocalID, setDistinguishedName, setKey, setLocalID, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Publisher

protected Publisher()
Default constructor.


Publisher

public Publisher(RequestContext context)
          throws NotAuthorizedException,
                 IdentityException,
                 ImsServiceException,
                 SQLException
Constructs a publisher based upon the user associated with the current request context.

Parameters:
context - the current request context (contains the active user)
Throws:
NotAuthorizedException - if the user does not have publishing rights
IdentityException - if an integrity violation occurs
ImsServiceException - if an exception occurs when creating the default folder
SQLException - if a database exception occurs

Publisher

public Publisher(RequestContext context,
                 String userDN)
          throws CredentialsDeniedException,
                 NotAuthorizedException,
                 IdentityException,
                 ImsServiceException,
                 SQLException
Constructs a publisher based upon the user associated with the current request context and a distinguished name on behalf of which a document will be published.

Parameters:
context - the current request context (contains the active user)
userDN - the DN associated with on behalf of which a document will be published.
Throws:
CredentialsDeniedException - if the supplied DN is invalid
NotAuthorizedException - if the user does not have publishing rights
IdentityException - if an integrity violation occurs
ImsServiceException - if an exception occurs when creating the default folder
SQLException - if a database exception occurs
Method Detail

getDefaultFolderName

public String getDefaultFolderName()
Gets the default folder name for this publisher.

Returns:
the default folder name

getFolderUuid

public String getFolderUuid()
Gets the folder uuid for this publisher.

Returns:
the folder uuid

setFolderUuid

public void setFolderUuid(String folderUuid)
Sets the folder uuid for this publisher.

Parameters:
folderUuid - the folder uuid

getIsAdministrator

public boolean getIsAdministrator()
Gets the status indicating whether this publisher is an administrator.

Returns:
true if this publisher is an administrator

getIsRemote

public boolean getIsRemote()
Gets the status indicating whether this publisher exists within a remote identity store.

Returns:
true if this publisher is a remote reference

buildSelectableGroups

public static Groups buildSelectableGroups(RequestContext context)
Builds a collection of groups that can be selected by the current user to set access policy

Parameters:
context - the current request context (contains the active user)
Returns:
the collection of groups that can be selected

buildSelectablePublishers

public static Users buildSelectablePublishers(RequestContext context,
                                              boolean forManagement)
Builds a collection of publishers (users) that can be selected by the current user.

Parameters:
context - the current request context (contains the active user)
forManagement - true if the list to build is in support of the metadata management page
Returns:
the collection of publishers that can be selected

makeSystemAdministrator

public static Publisher makeSystemAdministrator(RequestContext context)
                                         throws CredentialsDeniedException,
                                                IdentityException,
                                                SQLException,
                                                NotAuthorizedException,
                                                ImsServiceException
Creates a catalog administrator based upon the distinguished name credential supplied within the GPT configuration file (@catalogAdminDN).

The administrative publisher is used during background processes such as synchronization.

Parameters:
context - the current request context
Returns:
a publisher with catalog metadata administration rights
Throws:
CredentialsDeniedException - if the configured administrative credentials were invalid
NotAuthorizedException - if the associated user does not have administrative rights
IdentityException - if an integrity violation occurs
ImsServiceException - if an exception occurs when creating the default folder
SQLException - if a database exception occurs

Esri Geoportal Server
1.0

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