public interface IServices
| Modifier and Type | Method and Description |
|---|---|
Asset |
createNew(IAssetType assetType,
Oid context)
Creates a new asset.
|
Oid |
executeOperation(IOperation op,
Oid oid)
Executes an operation.
|
String |
executePassThroughQuery(String query)
Executes a Query API query using in JSON or YAML format.
|
IAssetType |
getAssetType(String token)
Returns the type information for an asset specified in a token.
|
Reader |
getAttachment(Oid attachmentOid)
Returns the attachment data for the specified attachment Oid.
|
IAttributeDefinition |
getAttributeDefinition(String token)
Returns the type information for an attribute specified in a token.
|
Reader |
getEmbeddedImage(Oid embeddedImageOid)
Returns the embedded image data for the specified attachment Oid.
|
Map<String,String> |
getLocalization(ArrayList<IAttributeDefinition> attributes)
Returns a Map of localized values.
|
String |
getLocalization(IAttributeDefinition attribute)
Returns a localization value based on an attribute definition.
|
String |
getLocalization(String key)
Returns a localization value based on key.
|
Oid |
getLoggedIn()
Determines the OID of the currently logged in user.
|
IMetaModel |
getMeta()
Returns the MetaModel.
|
Oid |
getOid(String token)
Returns an object identifier for the specified token.
|
IOperation |
getOperation(String token)
Returns the type information for an operation specified in a token.
|
V1Connector |
getV1Connector()
Returns the V1Connector.
|
QueryResult |
retrieve(Query query)
Executes a query and returns the results.
|
void |
save(Asset asset)
Persists changes to an asset without a comment.
|
void |
save(Asset[] assetList)
Saves multiple assets without a comment.
|
void |
save(Asset asset,
String comment)
Persists changes to as asset with a comment.
|
Oid |
saveAttachment(String filePath,
Asset asset,
String attachmentName)
Saves an attachment to the specified asset.
|
Oid |
saveEmbeddedImage(String filePath,
Asset asset)
Saves an embedded image to the specified asset.
|
IAssetType getAssetType(String token) throws MetaException
token - The token to processMetaException - if the token is invalidIAttributeDefinition getAttributeDefinition(String token) throws MetaException
token - The token to processMetaException - if the token is invalidIOperation getOperation(String token) throws MetaException
token - The token to processMetaException - if the token is invalidOid getOid(String token) throws OidException
token - The token to processOidException - if the token is invalidQueryResult retrieve(Query query) throws ConnectionException, APIException, OidException
query - The query to execute.ConnectionException - - if connection to VersionOne downOidException - - if there is problem related to Object IdentifiersAPIException - if there is a problem executing the queryvoid save(Asset asset) throws APIException, ConnectionException
asset - The asset that changedConnectionException - - if connection to VersionOne downAPIException - - if the save failsvoid save(Asset asset, String comment) throws APIException, ConnectionException
asset - The asset that changedcomment - - commentConnectionException - - if connection to VersionOne downAPIException - - if the save failsvoid save(Asset[] assetList) throws V1Exception
assetList - An array of assets to saveV1Exception - - if the save failsOid getLoggedIn() throws APIException, ConnectionException, OidException
ConnectionException - - if connection to VersionOne downOidException - - if there is problem related to Object IdentifiersAPIException - - if there is any other errorAsset createNew(IAssetType assetType, Oid context) throws V1Exception
assetType - The type of asset to createcontext - - context under which to create the assetV1Exception - - when the create failsOid executeOperation(IOperation op, Oid oid) throws APIException
op - The operation to executeoid - - OID of object on which method is executedAPIException - - when the operation failsIMetaModel getMeta()
V1Connector getV1Connector()
String executePassThroughQuery(String query)
query - The query JSON or YAML query stringString getLocalization(IAttributeDefinition attribute) throws V1Exception
attribute - An attribute definitionV1Exception - V1ExceptionString getLocalization(String key) throws V1Exception
key - String A string value of the keyV1Exception - V1ExceptionMap<String,String> getLocalization(ArrayList<IAttributeDefinition> attributes) throws ConnectionException
attributes - attributesConnectionException - ConnectionExceptionOid saveAttachment(String filePath, Asset asset, String attachmentName) throws V1Exception, IOException
filePath - Path and name of the attachment file.asset - Asset to save the attachment to.attachmentName - The name of the attachment.V1Exception - V1ExceptionIOException - IOExceptionReader getAttachment(Oid attachmentOid) throws V1Exception
attachmentOid - The Oid of the attachment to return.V1Exception - V1ExceptionOid saveEmbeddedImage(String filePath, Asset asset) throws V1Exception, IOException
filePath - Path and name of the embedded image file.asset - Asset to save the embedded image to.V1Exception - V1ExceptionIOException - IOExceptionReader getEmbeddedImage(Oid embeddedImageOid) throws V1Exception
embeddedImageOid - The Oid of the embedded image to return.V1Exception - V1ExceptionCopyright © 2015 VersionOne, Inc.. All rights reserved.