Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.acs.damsel.srvr.db
Class AssetDB  view AssetDB download AssetDB.java

java.lang.Object
  extended byorg.acs.damsel.srvr.db.AssetDB

public class AssetDB
extends java.lang.Object

Title: High-level database abstraction that deals with domain objects

Description: A singleton class which abstracts access to the sql database; including adding to, removing from, and querying. This class deals with domain objects. SQL generation and JDBC connection handling are peformed by MidAssetDB and LowAssetDB, respectively. The general form of an interaction with the AssetDB class is as follows: 1. Get a handle on the AssetDB object 2. Call one of the high level methods (addAsset, getSchema, etc) 3. That method extracts the information from the domain object and calls a middle-tier method. 4. The middle-tier method takes the information and prepares SQL code to accomplish the desired task. Note that the middle-tier methods are typically more generic than the high level methods. For instance, there are many add* methods, but only one insert. The SQL code is passed on to a low level method. 5. The low-level method (of which there are only a few) is reponsible for opening the connection to the database and handling the transaction. It also prepares the result (i.e., a vector of vectors of strings) in the case of a query, as well as a vector of result metadata.

6. From there, the results are propogated back up through the layers. In the case of a get* method, the high level method takes the results and constructs an object of the appropriate type. ********************************************************************** This class is actually now the "HighAssetDB" class and contains only the high level methods that AssetDB has. These methods include add, delete, get, and existence methods for things such as Collection, Schema, Assets, and Users. ***********************************************************************

Version:
1.9

Field Summary
private static AssetDB instance
           
private static org.apache.log4j.Logger log
           
private  MidAssetDB midAssetDB
           
 
Constructor Summary
private AssetDB()
           
 
Method Summary
 int addAsset(org.acs.damsel.srvr.asset.Asset a, java.lang.String collectionName)
          A high level method for adding an asset to a given collection owned by a given user.
 int addAssetToFavorites(org.acs.damsel.srvr.asset.Asset asset, org.acs.damsel.srvr.user.User user)
          This method will take the specified asset and add it to the usersfavorites table in the database along with the username.
 int addCollection(org.acs.damsel.srvr.collection.Collection collection)
          This is a high level method that adds a given collection to the CollectionTable in the database.
 int addGroup(org.acs.damsel.srvr.group.Group group)
          A high level method used to add a Group to the database.
 int addSchema(org.acs.damsel.srvr.schema.Schema s)
          A high level method for adding a Schema to both the SchemaTable and the SchemasTagTable in the database.
 int addSchemaTag(org.acs.damsel.srvr.schema.MetaDataTag tag, java.lang.String schemaName)
          This method adds a metaDataTag of name tag to the SchemasTagsTable, to the schema schemaName.
 int addSlideShow(java.lang.String slideShowName, java.lang.String delay, java.lang.String owner, java.lang.String permissionID)
          This method adds the specified slideShowName, delay, owner and permissionID to the slideshowtable in the database
 int addSlideShowAsset(java.lang.String slideShowName, java.lang.String assetFileName, java.lang.String owner)
          This method adds the specified slideShowName and asset to the slideshowtagstable
 int addSlideShowTag(java.lang.String slideShowName, java.lang.String metaDataTag, java.lang.String owner)
          This method adds the specified slideShowName and metadatatag to the slideshowtagstable
 int addUser(org.acs.damsel.srvr.user.User user)
          A high level method used to add a User to the database.
 int addUserToGroup(java.lang.String userName, java.lang.String groupName)
          A high level method to add a User to a Group.
 int deleteAsset(org.acs.damsel.srvr.asset.Asset a)
          A high level method for deleting an Asset from the database.
 int deleteCollection(org.acs.damsel.srvr.collection.Collection collection)
          Deletes the specified collection from the database.
 int deleteCollection(java.lang.String collection)
          Deletes the specified collection from the database
 int deleteGroup(java.lang.String groupName)
          A high level method used to delete a Group from the database.
 int deleteMultipleUsersFromGroup(java.lang.String groupName)
          Deletes all users in the specified group from the users groups table
 int deleteSchema(org.acs.damsel.srvr.schema.Schema s)
          A high level method for deleting a Schema from the database.
 int deleteSchemaTag(org.acs.damsel.srvr.schema.MetaDataTag tag, java.lang.String schemaName)
          This method deletes the specified MetaDataTag in specified schema
 int deleteUser(java.lang.String userName)
          A high level method used to delete a User from the database.
 int deleteUser(org.acs.damsel.srvr.user.User user)
          A high level method used to delete a User from the database.
 org.acs.damsel.srvr.collection.CollectionView getAllAssets()
          Constructs a SQL query for all assets and returns the result.
 org.acs.damsel.srvr.collection.CollectionView getAllAssetsFromCollection(java.lang.String collectionName)
          A high level method for getting a CollectionView containing only the assets that belong to the specified Collection.
private  Table getAllAssetsFromCollectionInTable(java.lang.String collectionName)
           
 java.util.Vector getAllMetadataTags()
          Obtain all the metadata tags used in the schematagstable
 org.acs.damsel.srvr.asset.Asset getAsset(java.lang.String fileName)
          A high level method for returning an asset by specifying its FileName attribute, which is the primary key for Assets in the database.
 org.acs.damsel.srvr.asset.Asset getAssetFromCollection(java.lang.String fileName, java.lang.String collectionName)
          A high level method for getting an Asset containing only the metadata required by a particular collection that the Asset belongs to.
 org.acs.damsel.srvr.collection.Collection getCollection(java.lang.String collectionName)
          Creates a NEW Collection with the specified name and populates its instance variables based on information found in the database
 java.util.Vector getCollectionNames()
          Returns a vector of Strings containing the names of all of the Collections stored in the database.
 java.util.Vector getCollectionsWithSchema(java.lang.String schemaName)
          This method returns a vector of strings containing names of all of the collections associated with the schema of schemaName.
 Table getCollectionTable()
           
private  int getFileNameFieldIndex(java.util.Vector metadata)
           
 org.acs.damsel.srvr.group.Group getGroup(java.lang.String groupName)
          This method will take in the groupName as a String and pull from the database the information associated with that groupName.
 java.util.Vector getGroupNames()
          This method returns a vector of strings containing all of the groups in the GroupsTable.
 java.util.Vector getGroupPermissions(java.lang.String groupName)
          This method takes in a group name and returns a vector of strings which holds all the permissions for that group.
 int getNumberOfCollectionsInDB()
          Determines the number of collections in the Database
 java.util.Vector getRepositoryList()
          Returns a list of the repositories in the database
 org.acs.damsel.srvr.schema.Schema getSchema(java.lang.String schemaName)
          A high level method for getting a Schema from the database.
 java.util.Vector getSchemaNames()
          This method returns a vector of strings containing all of the schemas in the SchemaTagsTable.
 org.acs.damsel.srvr.schema.Schema getSchemaOfCollection(java.lang.String collectionName)
          A high level method that returns the schema associated with the collection of the given name.
 org.acs.damsel.srvr.user.SlideShow getSlideShow(java.lang.String ownerName, java.lang.String slideShowName)
          This method will take in a slideShowName and fetch a slideShow from the database matching slideShowName.
 java.util.Vector getSlideShowAssetFileNames(java.lang.String slideShowName)
          This method returns a vector of strings containing all of the names of the assets in the specified slideshow
 java.util.Vector getSlideShowNames(org.acs.damsel.srvr.user.User user)
          This method returns a vector of strings containing all of the slide shows in the SlideShowTable for the specified User.
 org.acs.damsel.srvr.user.User getUser(java.lang.String userName, java.lang.String password)
          A high level method for getting a user by specifying the userName and password.
 org.acs.damsel.srvr.user.User getUserFromName(java.lang.String userName)
          A high level method for getting a user by specifying the userName.
 java.util.Vector getUsersGroups(java.lang.String userName)
          This method takes in a username and returns all the groups that user is a part of in a Vector.
 java.util.Vector getUsersInGroup(java.lang.String groupName)
           
 Table getUserTable()
           
static AssetDB instance()
          This is to be used instead of the construction because it is a sigleton class.
 boolean isAssetInCollection(java.lang.String fileName, java.lang.String collectionName)
          Checks if the specified collection contains the specified asset
 boolean isAssetInDB(org.acs.damsel.srvr.asset.Asset a)
          A high level method that indicates whether a given Asset exists in the database or not.
 boolean isAssetInFavorites(org.acs.damsel.srvr.asset.Asset asset, org.acs.damsel.srvr.user.User user)
          This method will look at the database and find out if the asset is in the myFavorites of the specified user.
 boolean isCollectionInDB(org.acs.damsel.srvr.collection.Collection c)
          Checks if the specified collection is in the database
 boolean isGroupInDB(org.acs.damsel.srvr.group.Group group)
          Checks if the specified group is in the database
 boolean isSchemaInDB(org.acs.damsel.srvr.schema.Schema s)
          Determine if the specified schema is in the database
 boolean isSchemaTagInTable(org.acs.damsel.srvr.schema.MetaDataTag tag, java.lang.String schemaName)
          This method checks if a given tag is found in the SchemasTagsTable.
 boolean isSlideShowAssetInDB(java.lang.String slideShowName, java.lang.String assetFileName, java.lang.String owner)
          This method will look at the database and find out if an entry with the specified slide show and asset exists
 boolean isSlideShowInDB(java.lang.String slideShowName, java.lang.String owner)
          This method will look at the database and find out if the specified slide show with the specified user is in the slideshow table.
 boolean isSlideShowTagInDB(java.lang.String slideShowName, java.lang.String metaDataTag, java.lang.String owner)
          This method will look at the database and find out if an entry with the specified slide show and tag exists
 boolean isUserInDB(org.acs.damsel.srvr.user.User user)
          Checks if the specified user is in the database
 int removeAssetFromAllCollections(org.acs.damsel.srvr.asset.Asset asset)
          This method removes the Asset from the AssetsCollectionsTable and, thus, any reference to it by any collection.
 boolean removeAssetFromCollection(org.acs.damsel.srvr.asset.Asset asset, java.lang.String collectionName)
          Remove the specified asset from the collection.
 int removeAssetFromFavorites(org.acs.damsel.srvr.asset.Asset asset, org.acs.damsel.srvr.user.User user)
          This method will remove the specified asset belonging to the specified user from the userscollections table in the database.
 int removeSlideShowAssetFromDB(java.lang.String slideShowName, java.lang.String assetFileName, java.lang.String owner)
          This method will remove the specified slideShow with the specified asset from the slideShowassets table in the database.
 int removeSlideShowFromDB(java.lang.String slideShowName, java.lang.String owner)
          This method will remove the specified slideShow belonging to the specified owner from the slideShow table in the database.
 int removeSlideShowTagFromDB(java.lang.String slideShowName, java.lang.String metaDataTag, java.lang.String owner)
          This method will remove the specified slideShow with the specified tag from the slideShowtags table in the database.
 int setSchemaOfCollection(org.acs.damsel.srvr.collection.Collection c, org.acs.damsel.srvr.schema.Schema s)
          Sets the specified collection's schema to the specified schema.
 int sizeDB()
          Returns the total number of assets in the Database
 void updateAsset(org.acs.damsel.srvr.asset.Asset asset)
          updateAsset works by first deleting the asset from the AssetTable and its metadata from the AssetMetaData table, and then re-adding the asset to both of those tables.
 int updateCollection(org.acs.damsel.srvr.collection.Collection collection)
          Updates the CollectionTable to use the information contained in the given Collection object.
 int updateSchema(org.acs.damsel.srvr.schema.Schema s)
          This method updates schema s in the SchemaTable.
 int updateUser(org.acs.damsel.srvr.user.User user)
          Updates the UsersTable to use the information contained in the given User object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

private static AssetDB instance

log

private static org.apache.log4j.Logger log

midAssetDB

private MidAssetDB midAssetDB
Constructor Detail

AssetDB

private AssetDB()
         throws java.sql.SQLException
Method Detail

instance

public static AssetDB instance()
                        throws java.sql.SQLException
This is to be used instead of the construction because it is a sigleton class. Establishes a connection to the database if one does not already exist and throws a SQLException if an error occurs.


getAllAssets

public org.acs.damsel.srvr.collection.CollectionView getAllAssets()
                                                           throws java.sql.SQLException
Constructs a SQL query for all assets and returns the result. Throws a SQLException if the SQL is malformed, there is not a database connection, etc.


addAsset

public int addAsset(org.acs.damsel.srvr.asset.Asset a,
                    java.lang.String collectionName)
             throws java.sql.SQLException
A high level method for adding an asset to a given collection owned by a given user. Note that the username is necessary because collections are uniquely identified by both their own name and the name of their owner.


updateAsset

public void updateAsset(org.acs.damsel.srvr.asset.Asset asset)
                 throws java.sql.SQLException
updateAsset works by first deleting the asset from the AssetTable and its metadata from the AssetMetaData table, and then re-adding the asset to both of those tables.


deleteAsset

public int deleteAsset(org.acs.damsel.srvr.asset.Asset a)
                throws java.sql.SQLException
A high level method for deleting an Asset from the database. This only deletes the asset from the AssetTable, not the AssetsCollectionsTable


addSchema

public int addSchema(org.acs.damsel.srvr.schema.Schema s)
              throws java.sql.SQLException
A high level method for adding a Schema to both the SchemaTable and the SchemasTagTable in the database.


addSchemaTag

public int addSchemaTag(org.acs.damsel.srvr.schema.MetaDataTag tag,
                        java.lang.String schemaName)
                 throws java.sql.SQLException
This method adds a metaDataTag of name tag to the SchemasTagsTable, to the schema schemaName.


deleteSchema

public int deleteSchema(org.acs.damsel.srvr.schema.Schema s)
                 throws java.sql.SQLException
A high level method for deleting a Schema from the database. Note that this method deletes the schema from the SchemaTable and the SchemasTagsTable.


deleteSchemaTag

public int deleteSchemaTag(org.acs.damsel.srvr.schema.MetaDataTag tag,
                           java.lang.String schemaName)
                    throws java.sql.SQLException
This method deletes the specified MetaDataTag in specified schema


getSchema

public org.acs.damsel.srvr.schema.Schema getSchema(java.lang.String schemaName)
                                            throws java.sql.SQLException,
                                                   org.acs.damsel.srvr.schema.SchemaException
A high level method for getting a Schema from the database. The Schema is returned with all of the MetaDataTags associated with it in the database.


getRepositoryList

public java.util.Vector getRepositoryList()
                                   throws java.sql.SQLException
Returns a list of the repositories in the database


getSchemaOfCollection

public org.acs.damsel.srvr.schema.Schema getSchemaOfCollection(java.lang.String collectionName)
                                                        throws org.acs.damsel.srvr.schema.SchemaException,
                                                               java.sql.SQLException
A high level method that returns the schema associated with the collection of the given name.


getCollectionsWithSchema

public java.util.Vector getCollectionsWithSchema(java.lang.String schemaName)
                                          throws java.sql.SQLException
This method returns a vector of strings containing names of all of the collections associated with the schema of schemaName.


getAsset

public org.acs.damsel.srvr.asset.Asset getAsset(java.lang.String fileName)
                                         throws java.sql.SQLException
A high level method for returning an asset by specifying its FileName attribute, which is the primary key for Assets in the database.


getAssetFromCollection

public org.acs.damsel.srvr.asset.Asset getAssetFromCollection(java.lang.String fileName,
                                                              java.lang.String collectionName)
                                                       throws java.sql.SQLException,
                                                              org.acs.damsel.srvr.schema.SchemaException
A high level method for getting an Asset containing only the metadata required by a particular collection that the Asset belongs to.


getAllMetadataTags

public java.util.Vector getAllMetadataTags()
Obtain all the metadata tags used in the schematagstable


getCollectionNames

public java.util.Vector getCollectionNames()
                                    throws java.sql.SQLException
Returns a vector of Strings containing the names of all of the Collections stored in the database.


getSchemaNames

public java.util.Vector getSchemaNames()
                                throws java.sql.SQLException
This method returns a vector of strings containing all of the schemas in the SchemaTagsTable.


getSlideShowAssetFileNames

public java.util.Vector getSlideShowAssetFileNames(java.lang.String slideShowName)
                                            throws java.sql.SQLException
This method returns a vector of strings containing all of the names of the assets in the specified slideshow


isAssetInDB

public boolean isAssetInDB(org.acs.damsel.srvr.asset.Asset a)
                    throws java.sql.SQLException
A high level method that indicates whether a given Asset exists in the database or not. Note that only the primary key (the asset's FileName) is used to perform the search.


sizeDB

public int sizeDB()
Returns the total number of assets in the Database


getUser

public org.acs.damsel.srvr.user.User getUser(java.lang.String userName,
                                             java.lang.String password)
                                      throws java.sql.SQLException
A high level method for getting a user by specifying the userName and password. Reflection is used to set the information from the results of the query as user properties.


getUserFromName

public org.acs.damsel.srvr.user.User getUserFromName(java.lang.String userName)
                                              throws java.sql.SQLException
A high level method for getting a user by specifying the userName. Reflection is used to set the information from the results of the query as user properties.


getUserTable

public Table getUserTable()

getCollectionTable

public Table getCollectionTable()

addUser

public int addUser(org.acs.damsel.srvr.user.User user)
            throws java.sql.SQLException
A high level method used to add a User to the database. Reflection is used to get the properties of the user that will be added as column names and the value of each property to be added as column values.


addGroup

public int addGroup(org.acs.damsel.srvr.group.Group group)
             throws java.sql.SQLException
A high level method used to add a Group to the database. Reflection is used to get the properties of the user group that will be added as column names and the value of each property to be added as column values.


addUserToGroup

public int addUserToGroup(java.lang.String userName,
                          java.lang.String groupName)
                   throws java.sql.SQLException
A high level method to add a User to a Group. Note that this does not add a new User to the UsersTable. For that you want addUser.


deleteMultipleUsersFromGroup

public int deleteMultipleUsersFromGroup(java.lang.String groupName)
                                 throws java.sql.SQLException
Deletes all users in the specified group from the users groups table


getUsersInGroup

public java.util.Vector getUsersInGroup(java.lang.String groupName)
                                 throws java.sql.SQLException

getGroupNames

public java.util.Vector getGroupNames()
                               throws java.sql.SQLException
This method returns a vector of strings containing all of the groups in the GroupsTable.


getSlideShowNames

public java.util.Vector getSlideShowNames(org.acs.damsel.srvr.user.User user)
                                   throws java.sql.SQLException
This method returns a vector of strings containing all of the slide shows in the SlideShowTable for the specified User.


deleteUser

public int deleteUser(org.acs.damsel.srvr.user.User user)
               throws java.sql.SQLException
A high level method used to delete a User from the database. Note that this also deletes the user from any references to it in the UsersGroupTable in the database.


deleteGroup

public int deleteGroup(java.lang.String groupName)
                throws java.sql.SQLException
A high level method used to delete a Group from the database.


deleteUser

public int deleteUser(java.lang.String userName)
               throws java.sql.SQLException
A high level method used to delete a User from the database. Note that this also deletes the user from any references to it in the UsersGroupTable in the database.


isUserInDB

public boolean isUserInDB(org.acs.damsel.srvr.user.User user)
                   throws java.sql.SQLException
Checks if the specified user is in the database


isGroupInDB

public boolean isGroupInDB(org.acs.damsel.srvr.group.Group group)
                    throws java.sql.SQLException
Checks if the specified group is in the database


getCollection

public org.acs.damsel.srvr.collection.Collection getCollection(java.lang.String collectionName)
                                                        throws java.sql.SQLException
Creates a NEW Collection with the specified name and populates its instance variables based on information found in the database


getAllAssetsFromCollection

public org.acs.damsel.srvr.collection.CollectionView getAllAssetsFromCollection(java.lang.String collectionName)
                                                                         throws java.sql.SQLException,
                                                                                org.acs.damsel.srvr.schema.SchemaException
A high level method for getting a CollectionView containing only the assets that belong to the specified Collection.


getAllAssetsFromCollectionInTable

private Table getAllAssetsFromCollectionInTable(java.lang.String collectionName)
                                         throws java.sql.SQLException

addCollection

public int addCollection(org.acs.damsel.srvr.collection.Collection collection)
                  throws java.sql.SQLException
This is a high level method that adds a given collection to the CollectionTable in the database.


deleteCollection

public int deleteCollection(org.acs.damsel.srvr.collection.Collection collection)
                     throws java.sql.SQLException,
                            org.acs.damsel.srvr.schema.SchemaException
Deletes the specified collection from the database. This method deletes not only the collection, but all of its associated assets in the AssetsCollectionsTable and its associated schema views in the SchemaTable.


deleteCollection

public int deleteCollection(java.lang.String collection)
                     throws java.sql.SQLException,
                            org.acs.damsel.srvr.schema.SchemaException
Deletes the specified collection from the database


isCollectionInDB

public boolean isCollectionInDB(org.acs.damsel.srvr.collection.Collection c)
                         throws java.sql.SQLException
Checks if the specified collection is in the database


getFileNameFieldIndex

private int getFileNameFieldIndex(java.util.Vector metadata)

isAssetInCollection

public boolean isAssetInCollection(java.lang.String fileName,
                                   java.lang.String collectionName)
Checks if the specified collection contains the specified asset


removeAssetFromCollection

public boolean removeAssetFromCollection(org.acs.damsel.srvr.asset.Asset asset,
                                         java.lang.String collectionName)
                                  throws java.sql.SQLException
Remove the specified asset from the collection. Checks if asset is in the specified collection, if so, removes the asset from the collection (by deleting the row in the AssetsCollectionsTable) and returns true. If asset is not in the collection, returns false and does not remove.


removeAssetFromAllCollections

public int removeAssetFromAllCollections(org.acs.damsel.srvr.asset.Asset asset)
                                  throws java.sql.SQLException
This method removes the Asset from the AssetsCollectionsTable and, thus, any reference to it by any collection. This will allow it to still show up as an orphaned Asset.


isSchemaInDB

public boolean isSchemaInDB(org.acs.damsel.srvr.schema.Schema s)
                     throws java.sql.SQLException
Determine if the specified schema is in the database


isSchemaTagInTable

public boolean isSchemaTagInTable(org.acs.damsel.srvr.schema.MetaDataTag tag,
                                  java.lang.String schemaName)
                           throws java.sql.SQLException
This method checks if a given tag is found in the SchemasTagsTable.


getNumberOfCollectionsInDB

public int getNumberOfCollectionsInDB()
Determines the number of collections in the Database


setSchemaOfCollection

public int setSchemaOfCollection(org.acs.damsel.srvr.collection.Collection c,
                                 org.acs.damsel.srvr.schema.Schema s)
                          throws java.sql.SQLException
Sets the specified collection's schema to the specified schema. Note that this method does not check if the collection already has a schema.


updateUser

public int updateUser(org.acs.damsel.srvr.user.User user)
               throws java.sql.SQLException
Updates the UsersTable to use the information contained in the given User object. If the User is not in the UsersTable yet, then no rows will be affected by the update and the return value will be 0. 0 is also returned if an error is encountered that prevents the update from being attempted.


updateCollection

public int updateCollection(org.acs.damsel.srvr.collection.Collection collection)
                     throws java.sql.SQLException
Updates the CollectionTable to use the information contained in the given Collection object. If the Collection is not in the CollectionTable yet, then no rows will be affected by the update and the return value will be 0. 0 is also returned if an error is encountered that prevents the update from being attempted.


updateSchema

public int updateSchema(org.acs.damsel.srvr.schema.Schema s)
                 throws java.sql.SQLException
This method updates schema s in the SchemaTable. Only the GroupName and PermissionID can be updated because they are the only two fields of a schema that can be changed.


getGroup

public org.acs.damsel.srvr.group.Group getGroup(java.lang.String groupName)
                                         throws java.sql.SQLException
This method will take in the groupName as a String and pull from the database the information associated with that groupName. A UserGroup object will be populated containing the information and returned.


getGroupPermissions

public java.util.Vector getGroupPermissions(java.lang.String groupName)
This method takes in a group name and returns a vector of strings which holds all the permissions for that group.


getUsersGroups

public java.util.Vector getUsersGroups(java.lang.String userName)
This method takes in a username and returns all the groups that user is a part of in a Vector.


addAssetToFavorites

public int addAssetToFavorites(org.acs.damsel.srvr.asset.Asset asset,
                               org.acs.damsel.srvr.user.User user)
This method will take the specified asset and add it to the usersfavorites table in the database along with the username.


addSlideShow

public int addSlideShow(java.lang.String slideShowName,
                        java.lang.String delay,
                        java.lang.String owner,
                        java.lang.String permissionID)
This method adds the specified slideShowName, delay, owner and permissionID to the slideshowtable in the database


addSlideShowTag

public int addSlideShowTag(java.lang.String slideShowName,
                           java.lang.String metaDataTag,
                           java.lang.String owner)
This method adds the specified slideShowName and metadatatag to the slideshowtagstable


addSlideShowAsset

public int addSlideShowAsset(java.lang.String slideShowName,
                             java.lang.String assetFileName,
                             java.lang.String owner)
This method adds the specified slideShowName and asset to the slideshowtagstable


removeAssetFromFavorites

public int removeAssetFromFavorites(org.acs.damsel.srvr.asset.Asset asset,
                                    org.acs.damsel.srvr.user.User user)
This method will remove the specified asset belonging to the specified user from the userscollections table in the database.


removeSlideShowFromDB

public int removeSlideShowFromDB(java.lang.String slideShowName,
                                 java.lang.String owner)
This method will remove the specified slideShow belonging to the specified owner from the slideShow table in the database.


removeSlideShowTagFromDB

public int removeSlideShowTagFromDB(java.lang.String slideShowName,
                                    java.lang.String metaDataTag,
                                    java.lang.String owner)
This method will remove the specified slideShow with the specified tag from the slideShowtags table in the database.


removeSlideShowAssetFromDB

public int removeSlideShowAssetFromDB(java.lang.String slideShowName,
                                      java.lang.String assetFileName,
                                      java.lang.String owner)
This method will remove the specified slideShow with the specified asset from the slideShowassets table in the database.


isAssetInFavorites

public boolean isAssetInFavorites(org.acs.damsel.srvr.asset.Asset asset,
                                  org.acs.damsel.srvr.user.User user)
This method will look at the database and find out if the asset is in the myFavorites of the specified user.


isSlideShowInDB

public boolean isSlideShowInDB(java.lang.String slideShowName,
                               java.lang.String owner)
This method will look at the database and find out if the specified slide show with the specified user is in the slideshow table.


isSlideShowTagInDB

public boolean isSlideShowTagInDB(java.lang.String slideShowName,
                                  java.lang.String metaDataTag,
                                  java.lang.String owner)
This method will look at the database and find out if an entry with the specified slide show and tag exists


isSlideShowAssetInDB

public boolean isSlideShowAssetInDB(java.lang.String slideShowName,
                                    java.lang.String assetFileName,
                                    java.lang.String owner)
This method will look at the database and find out if an entry with the specified slide show and asset exists


getSlideShow

public org.acs.damsel.srvr.user.SlideShow getSlideShow(java.lang.String ownerName,
                                                       java.lang.String slideShowName)
                                                throws java.sql.SQLException
This method will take in a slideShowName and fetch a slideShow from the database matching slideShowName.