- Version:
- $Revision: 1.1 $
- Author:
- $Author: richard $
|
Method Summary |
void |
addApplicationExtension(java.lang.String name)
Add an application extension to the profile. |
void |
addResourceProfileListener(ResourceProfileListener l)
Add a listener to the list that should be notified when something
in the profile changes, or if the profile is loaded / saved. |
ProfileTransport |
createProfileTransport()
Return a connected and authenticated ProfileTransport
appropriate for this profile |
void |
fireProfileChanged()
|
nanoxml.XMLElement |
getApplicationExtension(java.lang.String name)
Get an application extension to the profile. |
java.lang.String |
getApplicationProperty(java.lang.String name,
java.lang.String defaultValue)
Return one of the properties as a String given its property
name and a default value if the property does not exist is or invalid. |
boolean |
getApplicationPropertyBoolean(java.lang.String name,
boolean defaultValue)
Return one of the properties as an boolean given its property
name and a default value if the property does not exist is or invalid. |
int |
getApplicationPropertyInt(java.lang.String name,
int defaultValue)
Return one of the properties as an int given its property
name and a default value if the property does not exist is or invalid. |
java.util.Enumeration |
getApplicationPropertyKeys()
Get an Enumeration of all the property keys |
java.lang.String |
getName()
Get the name for this profile |
SchemeOptions |
getSchemeOptions()
Get the SchemeOptions |
URI |
getURI()
Get the URI for this resource |
boolean |
hasApplicationExtension(java.lang.String name)
Determine whether an application extension XML element is available
within the profile. |
boolean |
isNeedSave()
Get whether anything has changed since the profile was last loaded or saved. |
void |
load(java.io.InputStream in)
Load the profile given an input stream providing the XML data. |
void |
removeApplicationProperty(java.lang.String key)
Remove a property givens its name. |
void |
removeResourceProfileListener(ResourceProfileListener l)
Remove a listener from the list that should be notified when something
in the profile changes, or if the profile is loaded / saved. |
void |
save(java.io.OutputStream in)
Save the profile given an output stream to write the XML data to. |
void |
setApplicationProperty(java.lang.String name,
boolean value)
Set a property given its name and a value |
void |
setApplicationProperty(java.lang.String name,
int value)
Set a property given its name and a value |
void |
setApplicationProperty(java.lang.String name,
java.lang.String value)
Set a property given its name and a value |
void |
setName(java.lang.String name)
Set the name for this profile |
void |
setNeedSave(boolean needSave)
Set whether anything has changed since the profile was last loaded or saved. |
void |
setSchemeOptions(SchemeOptions options)
Set scheme specific options for this profile. |
void |
setURI(URI uri)
Set the URI for this resource |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResourceProfile
public ResourceProfile()
- Construct a new empty profile.
ResourceProfile
public ResourceProfile(URI uri)
- Construct a new profile given a URI
- Parameters:
uri - uri
ResourceProfile
public ResourceProfile(java.lang.String name,
URI uri)
- Construct a new profile given a URI and a name
- Parameters:
name - nameuri - uri
addResourceProfileListener
public void addResourceProfileListener(ResourceProfileListener l)
- Add a listener to the list that should be notified when something
in the profile changes, or if the profile is loaded / saved.
- Parameters:
l - listener to add
removeResourceProfileListener
public void removeResourceProfileListener(ResourceProfileListener l)
- Remove a listener from the list that should be notified when something
in the profile changes, or if the profile is loaded / saved.
- Parameters:
l - listener to remove
createProfileTransport
public ProfileTransport createProfileTransport()
throws ProfileException,
java.io.IOException,
AuthenticationException
- Return a connected and authenticated
ProfileTransport
appropriate for this profile
- Returns:
- ProfileTransport
- Throws:
ProfileException - if there is any problem with the profile
java.io.IOException - if the transport cannot connect
AuthenticationException - if the transport cannot authenticate
getSchemeOptions
public SchemeOptions getSchemeOptions()
- Get the SchemeOptions
- Returns:
- scheme options
setSchemeOptions
public void setSchemeOptions(SchemeOptions options)
- Set scheme specific options for this profile.
- Parameters:
options - scheme specific options to add
setName
public void setName(java.lang.String name)
- Set the name for this profile
- Parameters:
name - name
getName
public java.lang.String getName()
- Get the name for this profile
- Returns:
- name
setURI
public void setURI(URI uri)
- Set the URI for this resource
- Parameters:
uri - resource URI
getURI
public URI getURI()
- Get the URI for this resource
- Returns:
- resource URI
load
public void load(java.io.InputStream in)
throws java.io.IOException
- Load the profile given an input stream providing the XML data.
- Parameters:
in - instream providing XML data for profile
- Throws:
java.io.IOException - if profile cannot be loaded
save
public void save(java.io.OutputStream in)
throws java.io.IOException
- Save the profile given an output stream to write the XML data to.
- Throws:
java.io.IOException - if profile cannot be written
getApplicationPropertyInt
public int getApplicationPropertyInt(java.lang.String name,
int defaultValue)
- Return one of the properties as an
int given its property
name and a default value if the property does not exist is or invalid.
- Parameters:
name - property namedefaultValue - default value
- Returns:
- value
getApplicationPropertyBoolean
public boolean getApplicationPropertyBoolean(java.lang.String name,
boolean defaultValue)
- Return one of the properties as an
boolean given its property
name and a default value if the property does not exist is or invalid.
- Parameters:
name - property namedefaultValue - default value
- Returns:
- value
getApplicationProperty
public java.lang.String getApplicationProperty(java.lang.String name,
java.lang.String defaultValue)
- Return one of the properties as a
String given its property
name and a default value if the property does not exist is or invalid.
- Parameters:
name - property namedefaultValue - default value
- Returns:
- value
setApplicationProperty
public void setApplicationProperty(java.lang.String name,
java.lang.String value)
- Set a property given its name and a value
- Parameters:
name - property namevalue - value
setApplicationProperty
public void setApplicationProperty(java.lang.String name,
int value)
- Set a property given its name and a value
- Parameters:
name - property namevalue - value
setApplicationProperty
public void setApplicationProperty(java.lang.String name,
boolean value)
- Set a property given its name and a value
- Parameters:
name - property namevalue - value
getApplicationPropertyKeys
public java.util.Enumeration getApplicationPropertyKeys()
- Get an
Enumeration of all the property keys
- Returns:
- Enumeration of property keys
removeApplicationProperty
public void removeApplicationProperty(java.lang.String key)
- Remove a property givens its name.
- Parameters:
key - name
hasApplicationExtension
public boolean hasApplicationExtension(java.lang.String name)
- Determine whether an application extension XML element is available
within the profile.
- Parameters:
name -
- Returns:
getApplicationExtension
public nanoxml.XMLElement getApplicationExtension(java.lang.String name)
- Get an application extension to the profile.
- Parameters:
name -
- Returns:
addApplicationExtension
public void addApplicationExtension(java.lang.String name)
- Add an application extension to the profile.
- Parameters:
name -
isNeedSave
public boolean isNeedSave()
- Get whether anything has changed since the profile was last loaded or saved.
- Returns:
- Returns true if the profile needs saving.
setNeedSave
public void setNeedSave(boolean needSave)
- Set whether anything has changed since the profile was last loaded or saved.
- Parameters:
needSave - true if the profile needs saving.
fireProfileChanged
public void fireProfileChanged()
Copyright © 2003-2004 3SP LTD. All Rights Reserved.