lumis.portal.principal
Class PrincipalManager

Package class diagram package PrincipalManager
java.lang.Object
  extended by lumis.portal.principal.PrincipalManager
All Implemented Interfaces:
IPrincipalManager, IConfigKeyChecker

public class PrincipalManager
extends Object
implements IPrincipalManager

Manage Principals.

Since:
4.0.6

Field Summary
protected static int ACCESS_ADMINISTRATOR
           
protected static int ACCESS_OWNER
           
 
Constructor Summary
PrincipalManager()
           
 
Method Summary
 void add(SessionConfig sessionConfig, PrincipalConfig principal, ITransaction transaction)
          Add a Principal.
 void delete(SessionConfig sessionConfig, String principalId, ITransaction transaction)
          Remove a Principal.
 PrincipalConfig get(SessionConfig sessionConfig, String principalId, ITransaction transaction)
          Get the Principal.
 PrincipalConfig getByShortId(SessionConfig sessionConfig, String shortId, ITransaction transaction)
          Get the Principal given the shortId.
 boolean keyExists(SessionConfig sessionConfig, Object configKey, Object config, ITransaction transaction)
          Checks if configId matches an already persisted object
 void update(SessionConfig sessionConfig, PrincipalConfig principal, ITransaction transaction)
          Update a Principal.
protected  int validateAccess(SessionConfig sessionConfig, PrincipalConfig principal, ITransaction transaction)
           
protected  void validateAdministrationAccess(SessionConfig sessionConfig, PrincipalConfig principal, ITransaction transaction)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACCESS_OWNER

protected static final int ACCESS_OWNER
See Also:
Constant Field Values

ACCESS_ADMINISTRATOR

protected static final int ACCESS_ADMINISTRATOR
See Also:
Constant Field Values
Constructor Detail

PrincipalManager

public PrincipalManager()
Method Detail

add

public void add(SessionConfig sessionConfig,
                PrincipalConfig principal,
                ITransaction transaction)
         throws PortalException
Description copied from interface: IPrincipalManager
Add a Principal.

Specified by:
add in interface IPrincipalManager
Throws:
PortalException

update

public void update(SessionConfig sessionConfig,
                   PrincipalConfig principal,
                   ITransaction transaction)
            throws PortalException
Description copied from interface: IPrincipalManager
Update a Principal.

Specified by:
update in interface IPrincipalManager
Throws:
PortalException

delete

public void delete(SessionConfig sessionConfig,
                   String principalId,
                   ITransaction transaction)
            throws PortalException
Description copied from interface: IPrincipalManager
Remove a Principal.

Specified by:
delete in interface IPrincipalManager
Throws:
PortalException

get

public PrincipalConfig get(SessionConfig sessionConfig,
                           String principalId,
                           ITransaction transaction)
                    throws PortalException
Description copied from interface: IPrincipalManager
Get the Principal.

Specified by:
get in interface IPrincipalManager
Returns:
a PrincipalConfig.
Throws:
PortalException

getByShortId

public PrincipalConfig getByShortId(SessionConfig sessionConfig,
                                    String shortId,
                                    ITransaction transaction)
                             throws PortalException
Description copied from interface: IPrincipalManager
Get the Principal given the shortId.

Specified by:
getByShortId in interface IPrincipalManager
Returns:
a PrincipalConfig.
Throws:
PortalException

validateAdministrationAccess

protected void validateAdministrationAccess(SessionConfig sessionConfig,
                                            PrincipalConfig principal,
                                            ITransaction transaction)
                                     throws PortalException
Throws:
PortalException

validateAccess

protected int validateAccess(SessionConfig sessionConfig,
                             PrincipalConfig principal,
                             ITransaction transaction)
                      throws PortalException
Throws:
PortalException

keyExists

public boolean keyExists(SessionConfig sessionConfig,
                         Object configKey,
                         Object config,
                         ITransaction transaction)
Description copied from interface: IConfigKeyChecker
Checks if configId matches an already persisted object

Specified by:
keyExists in interface IConfigKeyChecker
config - Optional, allows a checker to read aditional fields to check composed keys
Returns:
true if configId matches an already persisted object


Lumisportal  5.5.0.091130 - Copyright © 2001-2007, Lumis. All Rights Reserved.