org.opensubsystems.inventory.logic.impl
Class IdentificationControllerImpl

java.lang.Object
  extended by org.opensubsystems.core.logic.impl.StatelessControllerImpl
      extended by org.opensubsystems.inventory.logic.impl.IdentificationControllerImpl
All Implemented Interfaces:
java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean, org.opensubsystems.core.logic.BasicDataController, org.opensubsystems.core.logic.DataController, org.opensubsystems.core.logic.ModifiableDataController, org.opensubsystems.core.logic.StatelessController, IdentificationController, org.opensubsystems.security.logic.SecureController

public class IdentificationControllerImpl
extends org.opensubsystems.core.logic.impl.StatelessControllerImpl
implements IdentificationController

Implementation of IdentificationController interface to manage identifications.

Version:
$Id: IdentificationControllerImpl.java,v 1.9 2007/01/28 06:54:42 bastafidli Exp $
Author:
Miro Halas
See Also:
Serialized Form
Code reviewer:
Miro Halas
Code reviewed:
1.5 2006/02/21 06:00:15 bastafidli
XDoclet tag:
type="Stateless" name="IdentificationController" jndi-name="org.opensubsystems.inventory.logic.IdentificationControllerRemote" local-jndi-name="org.opensubsystems.inventory.logic.IdentificationController"
XDoclet tag:
local-extends="javax.ejb.EJBLocalObject, org.opensubsystems.inventory.logic.IdentificationController" extends="javax.ejb.EJBObject, org.opensubsystems.inventory.logic.IdentificationController"
XDoclet tag:
type="Session" view-type="local" home="org.opensubsystems.security.logic.AuthorizationControllerHome" business="org.opensubsystems.security.logic.AuthorizationControllerLocal" ejb-name="AuthorizationController" ref-name="org.opensubsystems.security.logic.AuthorizationController"
XDoclet tag:
ejb-name="IdentificationController" jndi-name="org.opensubsystems.inventory.logic.IdentificationControllerRemote"
XDoclet tag:
ejb-ref-name="org.opensubsystems.security.logic.AuthorizationController" jndi-name="org.opensubsystems.security.logic.AuthorizationControllerRemote"
XDoclet tag:
ref-name="org.opensubsystems.security.logic.AuthorizationController" jndi-name="org.opensubsystems.security.logic.AuthorizationControllerRemote"
XDoclet tag:
ejb-ref-name="org.opensubsystems.security.logic.AuthorizationController" jndi-name="org.opensubsystems.security.logic.AuthorizationControllerRemote"

Field Summary
protected  org.opensubsystems.security.logic.AuthorizationController m_authorityControl
          Authorization controller used to check access rights.
protected  IdentificationFactory m_identificationFactory
          Factory to use to execute persistence operations.
 
Constructor Summary
IdentificationControllerImpl()
          Default constructor.
 
Method Summary
protected  int checkAccess(int iId, int iAction)
          Check access for given data object based on categories on which rights can be enforces.
 void constructor()
          
 org.opensubsystems.core.data.DataObject create(org.opensubsystems.core.data.DataObject data)
          
 void delete(int iId)
          
 org.opensubsystems.core.data.DataObject get(int iId)
          
 org.opensubsystems.security.data.SecurityDefinition[] getSecurityDefinitions()
          
 org.opensubsystems.core.data.ModifiableDataObject save(org.opensubsystems.core.data.ModifiableDataObject data)
          
 
Methods inherited from class org.opensubsystems.core.logic.impl.StatelessControllerImpl
ejbActivate, ejbPassivate, ejbRemove, setSessionContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_identificationFactory

protected IdentificationFactory m_identificationFactory
Factory to use to execute persistence operations.


m_authorityControl

protected org.opensubsystems.security.logic.AuthorizationController m_authorityControl
Authorization controller used to check access rights.

Constructor Detail

IdentificationControllerImpl

public IdentificationControllerImpl()
Default constructor.

Method Detail

get

public org.opensubsystems.core.data.DataObject get(int iId)
                                            throws org.opensubsystems.core.error.OSSException

Specified by:
get in interface org.opensubsystems.core.logic.DataController
Throws:
org.opensubsystems.core.error.OSSException
XDoclet tag:
XDoclet tag:
type="Supports"

create

public org.opensubsystems.core.data.DataObject create(org.opensubsystems.core.data.DataObject data)
                                               throws org.opensubsystems.core.error.OSSException

Specified by:
create in interface org.opensubsystems.core.logic.BasicDataController
Throws:
org.opensubsystems.core.error.OSSException
XDoclet tag:
XDoclet tag:
type="Required"

delete

public void delete(int iId)
            throws org.opensubsystems.core.error.OSSException

Specified by:
delete in interface org.opensubsystems.core.logic.BasicDataController
Throws:
org.opensubsystems.core.error.OSSException
XDoclet tag:
XDoclet tag:
type="Required"

save

public org.opensubsystems.core.data.ModifiableDataObject save(org.opensubsystems.core.data.ModifiableDataObject data)
                                                       throws org.opensubsystems.core.error.OSSException

Specified by:
save in interface org.opensubsystems.core.logic.ModifiableDataController
Throws:
org.opensubsystems.core.error.OSSException
XDoclet tag:
XDoclet tag:
type="Required"

getSecurityDefinitions

public org.opensubsystems.security.data.SecurityDefinition[] getSecurityDefinitions()

Specified by:
getSecurityDefinitions in interface org.opensubsystems.security.logic.SecureController
XDoclet tag:
XDoclet tag:
type="Supports"

constructor

public void constructor()
                 throws org.opensubsystems.core.error.OSSException

Specified by:
constructor in interface org.opensubsystems.core.logic.StatelessController
Overrides:
constructor in class org.opensubsystems.core.logic.impl.StatelessControllerImpl
Throws:
org.opensubsystems.core.error.OSSException
XDoclet tag:
XDoclet tag:
type="Supports"

checkAccess

protected int checkAccess(int iId,
                          int iAction)
                   throws org.opensubsystems.core.error.OSSException
Check access for given data object based on categories on which rights can be enforces. Since the security for this data object is not dependent on the actual data elements (categories) it is sufficient to specify id of the data object.

Parameters:
iId - - id of data object to check
iAction - - action to check for, one of the ActionConstants.RIGHT_XXX constants
Returns:
int - AccessRight.ACCESS_GRANTED or AccessRight.ACCESS_DENIED
Throws:
org.opensubsystems.core.error.OSSException - - an error has occured


Copyright © 2003 - 2006 OpenSubsystems s.r.o.