123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385 |
- /**
- * 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.HashMap;
- import java.util.Locale;
- import java.util.Set;
- import java.util.Vector;
- import com.cognos.CAM_AAA.authentication.IAccount;
- @SuppressWarnings("rawtypes")
- public class Account extends UiClass implements IAccount
- {
- /**
- * Creates a IBM Cognos 8 Account
- *
- * @param theObjectID
- * The unique identifier for the account.
- */
- public Account(String theObjectID)
- {
- super(theObjectID);
- businessPhone = null;
- email = null;
- contentLocale = null;
- productLocale = null;
- faxPhone = null;
- givenName = null;
- homePhone = null;
- mobilePhone = null;
- pagerPhone = null;
- postalAddress = null;
- surname = null;
- userName = null;
- customProperties = null;
- }
- /*
- * (non-Javadoc)
- *
- * @see com.cognos.CAM_AAA.authentication.IAccount#getBusinessPhone()
- */
- public String getBusinessPhone()
- {
- return businessPhone;
- }
- /*
- * (non-Javadoc)
- *
- * @see com.cognos.CAM_AAA.authentication.IAccount#getEmail()
- */
- public String getEmail()
- {
- return email;
- }
- /*
- * (non-Javadoc)
- *
- * @see com.cognos.CAM_AAA.authentication.IAccount#getContentLocale()
- */
- public Locale getContentLocale()
- {
- return contentLocale;
- }
- /*
- * (non-Javadoc)
- *
- * @see com.cognos.CAM_AAA.authentication.IAccount#getFaxPhone()
- */
- public String getFaxPhone()
- {
- return faxPhone;
- }
- /*
- * (non-Javadoc)
- *
- * @see com.cognos.CAM_AAA.authentication.IAccount#getGivenName()
- */
- public String getGivenName()
- {
- return givenName;
- }
- /*
- * (non-Javadoc)
- *
- * @see com.cognos.CAM_AAA.authentication.IAccount#getHomePhone()
- */
- public String getHomePhone()
- {
- return homePhone;
- }
- /*
- * (non-Javadoc)
- *
- * @see com.cognos.CAM_AAA.authentication.IAccount#getMobilePhone()
- */
- public String getMobilePhone()
- {
- return mobilePhone;
- }
- /*
- * (non-Javadoc)
- *
- * @see com.cognos.CAM_AAA.authentication.IAccount#getPagerPhone()
- */
- public String getPagerPhone()
- {
- return pagerPhone;
- }
- /*
- * (non-Javadoc)
- *
- * @see com.cognos.CAM_AAA.authentication.IAccount#getPostalAddress()
- */
- public String getPostalAddress()
- {
- return postalAddress;
- }
- /*
- * (non-Javadoc)
- *
- * @see com.cognos.CAM_AAA.authentication.IAccount#getProductLocale()
- */
- public Locale getProductLocale()
- {
- return productLocale;
- }
- /*
- * (non-Javadoc)
- *
- * @see com.cognos.CAM_AAA.authentication.IAccount#getSurname()
- */
- public String getSurname()
- {
- return surname;
- }
- /*
- * (non-Javadoc)
- *
- * @see com.cognos.CAM_AAA.authentication.IAccount#getUserName()
- */
- public String getUserName()
- {
- return userName;
- }
- /**
- * Sets the business phone property.
- *
- * @param theBusinessPhone
- * The business phone number value.
- */
- public void setBusinessPhone(String theBusinessPhone)
- {
- businessPhone = theBusinessPhone;
- }
- /**
- * Sets the content locale property.
- *
- * @param theContentLocale
- * The content locale value.
- */
- public void setContentLocale(Locale theContentLocale)
- {
- contentLocale = theContentLocale;
- }
- /**
- * Sets the email property.
- *
- * @param theEmail
- * The email value.
- */
- public void setEmail(String theEmail)
- {
- email = theEmail;
- }
- /**
- * Sets the fax phone number property.
- *
- * @param theFaxPhone
- * The fax phone number value.
- */
- public void setFaxPhone(String theFaxPhone)
- {
- faxPhone = theFaxPhone;
- }
- /**
- * Sets the given name property.
- *
- * @param theGivenName
- * The given name value.
- */
- public void setGivenName(String theGivenName)
- {
- givenName = theGivenName;
- }
- /**
- * Sets the home phone number property.
- *
- * @param theHomephone
- * The home phone number value.
- */
- public void setHomePhone(String theHomephone)
- {
- homePhone = theHomephone;
- }
- /**
- * Sets the mobile phone number property.
- *
- * @param theMobilePhone
- * The mobile phone number value.
- */
- public void setMobilePhone(String theMobilePhone)
- {
- mobilePhone = theMobilePhone;
- }
- /**
- * Sets the pager phone number property.
- *
- * @param thePagerPhone
- * The pager phone number value.
- */
- public void setPagerPhone(String thePagerPhone)
- {
- pagerPhone = thePagerPhone;
- }
- /**
- * Sets the postal address property.
- *
- * @param thePostalAddress
- * The postal address value.
- */
- public void setPostalAddress(String thePostalAddress)
- {
- postalAddress = thePostalAddress;
- }
- /**
- * @param theProductLocale
- */
- public void setProductLocale(Locale theProductLocale)
- {
- productLocale = theProductLocale;
- }
- /**
- * @param theSurname
- */
- public void setSurname(String theSurname)
- {
- surname = theSurname;
- }
- /**
- * @param theUsername
- */
- public void setUserName(String theUsername)
- {
- userName = theUsername;
- }
- /*
- * (non-Javadoc)
- *
- * @see com.cognos.CAM_AAA.authentication.IAccount#getCustomPropertyNames()
- */
- public String[] getCustomPropertyNames()
- {
- if (customProperties != null)
- {
- Set keySet = this.customProperties.keySet();
- return (String[]) keySet.toArray(new String[keySet.size()]);
- }
- return null;
- }
- /*
- * (non-Javadoc)
- *
- * @see com.cognos.CAM_AAA.authentication.IAccount#getCustomPropertyValue(java.lang.String)
- */
- public String[] getCustomPropertyValue(String theName)
- {
- if (customProperties != null)
- {
- Vector v = (Vector) this.customProperties.get(theName);
- if (v != null)
- {
- return (String[]) v.toArray(new String[v.size()]);
- }
- }
- return null;
- }
- /**
- * Adds a custom property for an account.
- *
- * @param theName
- * The name of the property to add.
- * @param theValue
- * The value of the property to add.
- */
- public void addCustomProperty(String theName, String theValue)
- {
- if (customProperties == null)
- {
- customProperties = new HashMap();
- }
- Vector v = (Vector) this.customProperties.get(theName);
- if (v == null)
- {
- v = new Vector();
- this.customProperties.put(theName, v);
- }
- v.add(theValue);
- }
- private String businessPhone;
- private String email;
- private Locale contentLocale;
- private Locale productLocale;
- private String faxPhone;
- private String givenName;
- private String homePhone;
- private String mobilePhone;
- private String pagerPhone;
- private String postalAddress;
- private String surname;
- private String userName;
- private HashMap customProperties;
- }
|