com.fatwire.assetapi.def
Interface AssetTypeDefManager

All Known Implementing Classes:
AssetTypeDefManagerImpl

public interface AssetTypeDefManager

This interface provides management services for Asset type definitions.

Note: Only read operations are implemented as of now. Attempt to perform a write operation results in UnsupportedOperationException.

One can look up an asset type's definition using AssetTypeDefManager.findByName(String,String). In addition, this interface provides access names of all asset types AssetTypeDefManager.getAssetTypes() and subtypes AssetTypeDefManager.getSubTypes(String).


Method Summary
 void create(AssetTypeDef def)
          NOTE: This method is not implemented yet.
 void delete(java.util.List<java.lang.String> assetTypeNames)
          NOTE: This method is not implemented yet.
 AssetTypeDef findByName(java.lang.String assetTypeName, java.lang.String subtype)
          Finds an asset type definition by its name The method expects a valid asset type to be passed in.
 java.util.List<java.lang.String> getAssetTypes()
          Returns all asset type names in the system.
 java.util.List<java.lang.String> getSubTypes(java.lang.String assetType)
          Returns subtype names given the asset type name If the asset type name specified is not existed in System, the method would return an empty List and will not throw exception.
 AssetTypeDef newAssetTypeDef()
          NOTE: This method is not implemented yet.
 AssetAssociationDef newAssociationDef()
          NOTE: This method is not implemented yet.
 AttributeDef newAttributeDef()
          NOTE: This method is not implemented yet.
 

Method Detail

findByName

AssetTypeDef findByName(java.lang.String assetTypeName,
                        java.lang.String subtype)
                        throws AssetAccessException
Finds an asset type definition by its name The method expects a valid asset type to be passed in. If the asset type does not exist in the system, an AssetAccessException would be thrown. Subtye is optional and only is effective if the asset type is flex asset type. When the asset type is flex asset type and null is passed in for subtype, only the basic standard attributes would be returned in AssetTypeDef. If the asset type is flex asset type and an invalid subtype is passed in, an AssetAccessException would be thrown.

Parameters:
assetTypeName - name of the asset type definition.
subtype - Subtype of asset definition, if any.
Returns:
AssetTypeDef if the asset type by that name can be found.
Throws:
AssetAccessException - is thrown if no asset type/subtype exist with given names. AssetAccessException also wraps any internal exceptions generated by the framework.

getAssetTypes

java.util.List<java.lang.String> getAssetTypes()
                                               throws AssetAccessException
Returns all asset type names in the system.

Returns:
List of asset type names.
Throws:
AssetAccessException - wraps any internal exceptions generated by the framework.

getSubTypes

java.util.List<java.lang.String> getSubTypes(java.lang.String assetType)
                                             throws AssetAccessException
Returns subtype names given the asset type name If the asset type name specified is not existed in System, the method would return an empty List and will not throw exception.

Parameters:
assetType - name of the asset type to get subtypes for
Returns:
List of valid subtype names.
Throws:
AssetAccessException - wraps any internal exceptions generated by the framework.

create

void create(AssetTypeDef def)
            throws AssetAccessException
NOTE: This method is not implemented yet. Creates an assetTypeDef in the database

Parameters:
def - Asset definition to create
Throws:
AssetAccessException - captures layer specific failures and wraps other internal exceptions.

delete

void delete(java.util.List<java.lang.String> assetTypeNames)
            throws AssetAccessException
NOTE: This method is not implemented yet. Deletes asset types from the database and all their instances.

Parameters:
assetTypeNames - name of the asset types to be deleted.
Throws:
AssetAccessException - captures layer specific failures and wraps other internal exceptions.

newAttributeDef

AttributeDef newAttributeDef()
NOTE: This method is not implemented yet. Creates a new instance of AttributeTypeDefinition

Returns:
new (blank) AttributeTypeDef

newAssetTypeDef

AssetTypeDef newAssetTypeDef()
NOTE: This method is not implemented yet. Create an empty AssetTypeDef

Returns:
empty asset type definition.

newAssociationDef

AssetAssociationDef newAssociationDef()
NOTE: This method is not implemented yet. Creates a new instance of Association by a given name.

Returns:
AssetAssociationDef