|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.funambol.syncclient.spap.AssetDAO
public class AssetDAO
This class supplies the methods for use the DM like repository of the information on the present assets on the client. The DM is used with the following node structure:
conduit applications <manufacturer> <asset's name> asset (contains the information of the asset) currentVersion (contains the information of the version installed) newVersion (contains the information of the new version to install)
Constructor Summary | |
---|---|
AssetDAO()
Constructs a new AssetDAO |
Method Summary | |
---|---|
java.util.Vector |
getAllAsset()
Returns the list of all asset |
Asset |
getAsset(java.lang.String idAsset)
Returns the asset with the given identifier |
java.lang.String |
getAssetState(java.lang.String idAsset)
Returns the state of the asset identified from the given id |
java.util.Vector |
listAsset(java.lang.String state)
Returns the list of the asset with the given state. |
void |
removeAsset(Asset asset)
Remove the asset from DM |
void |
setAsset(Asset asset,
java.sql.Timestamp time)
Save the asset. |
Asset |
setAssetAsNotValid(Asset asset,
java.lang.Throwable cause)
Sets the asset as NOT VALID |
Asset |
setAssetState(Asset asset,
java.lang.String state)
Sets the state of the asset. |
Asset |
setAssetState(java.lang.String idAsset,
java.lang.String state)
Sets the state of the asset identified from the given idAsset |
protected void |
setAssetVersion(java.lang.String manufacturer,
java.lang.String name,
AssetVersion assetVersion,
boolean isNewVersion)
Saving the given AssetVersion for the asset identified from the specified manufacturer and name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AssetDAO()
Method Detail |
---|
public void setAsset(Asset asset, java.sql.Timestamp time) throws AssetManagementException
asset
- asset to savetime
- time of the saving
AssetManagementException
- if an error occurs during the savingpublic Asset getAsset(java.lang.String idAsset) throws AssetManagementException
idAsset
- the identifier of the asset
AssetManagementException
- if Asset not existpublic Asset setAssetState(java.lang.String idAsset, java.lang.String state) throws AssetManagementException
idAsset
- identifier of the asset of which wants to set the statestate
- state of the asset
AssetManagementException
- if an error occurs or if asset not existspublic Asset setAssetState(Asset asset, java.lang.String state) throws AssetManagementException
asset
- asset of which wants to set the statestate
- state of the asset
AssetManagementException
- if a error occurs during settingpublic java.util.Vector getAllAsset()
public java.lang.String getAssetState(java.lang.String idAsset) throws AssetManagementException
idAsset
- identifier of the asset
AssetManagementException
- if asset not existspublic java.util.Vector listAsset(java.lang.String state)
state
is null, returns
the list of the all asset.
state
- the state of the wanted assets.
public void removeAsset(Asset asset) throws AssetManagementException
asset
- asset to remove
AssetManagementException
- if an error occurspublic Asset setAssetAsNotValid(Asset asset, java.lang.Throwable cause) throws AssetManagementException
asset
- asset to set as NOT VALIDcause
- the cause for which the asset is not valid
AssetManagementException
- if a error occursprotected void setAssetVersion(java.lang.String manufacturer, java.lang.String name, AssetVersion assetVersion, boolean isNewVersion) throws DMException
If isNewVersion is true
, the given version is
saved as newVersion otherwise is saved as currentVersion
manufacturer
- manufacturer of the asset to modifyname
- name of the asset to modifyassetVersion
- version to savingisNewVersion
- if true
, save
the version as newVersion,
otherwise save the version as currentVersion
DMException
- if an error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |