CustomerPropertyManager Interface
- public interface CustomerPropertyManager
extends EntityPropertyManager
Manages properties associated with Customer. Implemented as a stateless
session bean. Delegates calls to the CustomerEJB.
Handles property sets for "CustomerProperties". This mapping can be found
in usermgmt-ejb-jar.xml deployment descriptor.
-
All Superinterfaces
-
EJBObject, EntityPropertyManager, Remote
public void |
-
createCustomer(String customerName)
- Create a customer record with the given name.
|
public boolean |
-
customerExists(String customerName)
- Determine if a customer exists
|
public void |
-
deleteCustomer(String customerName)
- Remove a customer
|
public Object |
-
getProperty(String customerName, String propertySet, String propertyName)
- Returns the value of the property defined for the specified
property and property set.
|
public String |
-
getPropertyAsString(String customerName, String propertySet, String propertyName)
- Get a property from the customer, converted to a String
If the property is not found, the default value from the property
set will be returned.
|
public Object |
-
removeProperty(String customerName, String propertySet, String propertyName)
- Remove a property from the customer
|
public void |
-
setProperty(String customerName, String propertySet, String propertyName, Object value)
- Set a property in the profile
|
Methods from interface com.bea.p13n.property.EntityPropertyManager |
createUniqueId, getDynamicProperties, getEntityNames, getHomeName, getProperties, getProperty, getPropertyLocator, getUniqueId, removeEntity, removeProperties, removeProperty, setProperty |
createCustomer(String) Method
public void createCustomer(String customerName)
throws RemoteException, Exception
Create a customer record with the given name.
Parameters
-
customerName
- the name of the customer to create
Exceptions
-
RemoteException
-
Exception
customerExists(String) Method
public boolean customerExists(String customerName)
throws RemoteException, CustomerNotFoundException
Determine if a customer exists
Parameters
-
customerName
- the name to look for
Returns
- true if it exists, false otherwise
Exceptions
-
RemoteException
-
CustomerNotFoundException
deleteCustomer(String) Method
public void deleteCustomer(String customerName)
throws RemoteException, CustomerNotFoundException
Remove a customer
Parameters
-
customerName
- the name of the customer to remove
Exceptions
-
RemoteException
-
CustomerNotFoundException
getProperty(String, String, String) Method
public Object getProperty(String customerName,
String propertySet,
String propertyName)
throws RemoteException, CustomerNotFoundException
Returns the value of the property defined for the specified
property and property set.
If the property does not have a value persisted, then null is returned.
Parameters
-
customerName
- the name of the customer whose property we wish
to retrieve
-
propertySet
- the name of the property set
-
propertyName
- the name of the property
Returns
- the property's value, or null if there is none
Exceptions
-
RemoteException
-
CustomerNotFoundException
- if the customer is not valid
getPropertyAsString(String, String, String) Method
public String getPropertyAsString(String customerName,
String propertySet,
String propertyName)
throws RemoteException, CustomerNotFoundException
Get a property from the customer, converted to a String
If the property is not found, the default value from the property
set will be returned.
Parameters
-
customerName
- the name of the profile to read
-
propertySet
- the property set containing the property
-
propertyName
- the name of the property to retrieve
Returns
- the property's value as a String
Exceptions
-
RemoteException
-
CustomerNotFoundException
- if the customer is not valid
removeProperty(String, String, String) Method
public Object removeProperty(String customerName,
String propertySet,
String propertyName)
throws RemoteException, CustomerNotFoundException
Remove a property from the customer
Parameters
-
customerName
- the name of the customer to modify
-
propertySet
- the property set containing the property
-
propertyName
- the name of the property to retrieve
Returns
- the old value of the property
Exceptions
-
RemoteException
-
CustomerNotFoundException
- if the customer is not valid
setProperty(String, String, String, Object) Method
public void setProperty(String customerName,
String propertySet,
String propertyName,
Object value)
throws PropertyValidationException, CustomerNotFoundException, RemoteException
Set a property in the profile
Parameters
-
customerName
- the name of the profile to modify
-
propertySet
- the property set containing the property
-
propertyName
- the name of the property to retrieve
-
value
- the new value for the property
Exceptions
-
PropertyValidationException
- if the new value is not valid
-
CustomerNotFoundException
- if the customer is not valid
-
RemoteException