com.ibm.pim.utils
Interface DataSource


public interface DataSource

This interface defines methods for DataSource.

Since:
6.0.0

Nested Class Summary
static class DataSource.Property
          Datasource Property type
static class DataSource.Type
          Datasource type
 
Field Summary
static java.lang.String copyright
           
 
Method Summary
 void delete()
          Deletes the Datasource
 java.lang.String getName()
          Returns the name of this datasource
 java.lang.String getProperty(DataSource.Property propertyName)
          Retrieves the properties of this datasource
 DataSource.Type getType()
          Retrieves the datasource type
 void save()
          Saves the changes made to this datasource
 void setProperty(DataSource.Property propertyName, java.lang.String propertyValue)
          Sets the datasource property
 

Field Detail

copyright

static final java.lang.String copyright
See Also:
Constant Field Values
Method Detail

getName

java.lang.String getName()
Returns the name of this datasource

Returns:
Name of the datasource
Throws:
PIMInternalException - If there is an internal error

getType

DataSource.Type getType()
Retrieves the datasource type

Returns:
The Datasource Type
Throws:
PIMInternalException - If an internal error occurs

getProperty

java.lang.String getProperty(DataSource.Property propertyName)
Retrieves the properties of this datasource

Parameters:
propertyName - The name of the property
Returns:
The value for the property
Throws:
PIMInternalException - If an internal error occurs
java.lang.UnsupportedOperationException - If the user tries to get a property which is not valid for this type of DataSource
java.lang.IllegalArgumentException - If propertyName passed in is null

setProperty

void setProperty(DataSource.Property propertyName,
                 java.lang.String propertyValue)
Sets the datasource property

Parameters:
propertyName - The name of the property to be set
propertyValue - The value for the property
Throws:
PIMInternalException - If an internal error occurs
java.lang.UnsupportedOperationException - If the user tries to set a property which is not valid for this type of DataSource
java.lang.IllegalArgumentException - If the argument passed in are null or empty

delete

void delete()
Deletes the Datasource

Throws:
PIMInternalException - If an internal error occurs while performing this operation
PIMAuthorizationException - Reserved for future use

save

void save()
Saves the changes made to this datasource

Throws:
PIMInternalException - If an internal error occurs while performing this operation
PIMAuthorizationException - Reserved for future use
java.lang.IllegalStateException - If the state of the Datasource Properties are not set properly when attempting a save