123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 |
- /**
- * Licensed Materials - Property of IBM
- *
- * IBM Cognos Products: CAMAAA
- *
- * (C) Copyright IBM Corp. 2005, 2012
- *
- * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with
- * IBM Corp.
- */
- import java.util.Vector;
- import com.cognos.CAM_AAA.authentication.IAccount;
- import com.cognos.CAM_AAA.authentication.IBiBusHeader;
- import com.cognos.CAM_AAA.authentication.ICredential;
- import com.cognos.CAM_AAA.authentication.IGroup;
- import com.cognos.CAM_AAA.authentication.IRole;
- import com.cognos.CAM_AAA.authentication.ITrustedCredential;
- import com.cognos.CAM_AAA.authentication.IVisa;
- import com.cognos.CAM_AAA.authentication.SystemRecoverableException;
- import com.cognos.CAM_AAA.authentication.UnrecoverableException;
- import com.cognos.CAM_AAA.authentication.UserRecoverableException;
- public class Visa implements IVisa
- {
- /**
- *
- */
- public Visa()
- {
- super();
- roles = null;
- groups = null;
- }
- /**
- * @param theAccount
- * @throws UnrecoverableException
- */
- public void init(IAccount theAccount) throws UnrecoverableException
- {
- account = theAccount;
- }
- /**
- * @throws UnrecoverableException
- */
- public void destroy() throws UnrecoverableException
- {
- roles = null;
- groups = null;
- account = null;
- }
- /*
- * (non-Javadoc)
- *
- * @see com.cognos.CAM_AAA.authentication.IVisa#generateTrustedCredential(com.cognos.CAM_AAA.authentication.IBiBusHeader)
- */
- public ITrustedCredential generateTrustedCredential(
- IBiBusHeader theAuthRequest) throws UserRecoverableException,
- SystemRecoverableException, UnrecoverableException
- {
- return null;
- }
- /*
- * (non-Javadoc)
- *
- * @see com.cognos.CAM_AAA.authentication.IVisa#generateCredential(com.cognos.CAM_AAA.authentication.IBiBusHeader)
- */
- public ICredential generateCredential(IBiBusHeader theAuthRequest)
- throws UserRecoverableException, SystemRecoverableException,
- UnrecoverableException
- {
- return null;
- }
- /*
- * (non-Javadoc)
- *
- * @see com.cognos.CAM_AAA.authentication.IVisa#isValid()
- */
- public boolean isValid()
- {
- return true;
- }
- /*
- * (non-Javadoc)
- *
- * @see com.cognos.CAM_AAA.authentication.IVisa#getAccount()
- */
- public IAccount getAccount()
- {
- return account;
- }
- /**
- * @param theGroup
- */
- public void addGroup(IGroup theGroup)
- {
- if (groups == null)
- {
- groups = new Vector();
- }
- groups.add(theGroup);
- }
- /*
- * (non-Javadoc)
- *
- * @see com.cognos.CAM_AAA.authentication.IVisa#getGroups()
- */
- public IGroup[] getGroups()
- {
- if (groups != null)
- {
- IGroup[] array = new IGroup[groups.size()];
- return (IGroup[]) groups.toArray(array);
- }
- return null;
- }
- /**
- * @param theRole
- */
- public void addRole(IRole theRole)
- {
- if (roles == null)
- {
- roles = new Vector();
- }
- roles.add(theRole);
- }
- /*
- * (non-Javadoc)
- *
- * @see com.cognos.CAM_AAA.authentication.IVisa#getRoles()
- */
- public IRole[] getRoles()
- {
- if (roles != null)
- {
- IRole[] array = new IRole[roles.size()];
- return (IRole[]) roles.toArray(array);
- }
- return null;
- }
- private Vector roles;
- private Vector groups;
- private IAccount account;
- }
|