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

Quick Search    Search Deep

Source code: com/flexstor/ejb/assetsinprocess/AssetsInProcess.java


1   /*
2    * AssetsInProcess.java
3    *
4    * Copyright $Date: 2003/08/11 02:22:31 $ FLEXSTOR.net Inc.
5    *
6    * This work is licensed for use and distribution under license terms found at
7    * http://www.flexstor.org/license.html
8    *
9    */
10  
11  package com.flexstor.ejb.assetsinprocess;
12  
13  import java.util.Hashtable;
14  import java.util.Vector;
15  
16  import com.flexstor.common.data.ActionData;
17  import com.flexstor.common.exceptions.ejb.EjbException;
18  import com.flexstor.ejb.EjbObject;
19  
20  /**
21   *
22   * <P>
23   * AssetsInProcess <BR>
24   * <BLOCKQUOTE>
25   *    Inserts, deletes, updates and queries the ASSETS_INPROCESS table. <BR>
26   *    This table is used by any client of the FLEXSTORdb software to signal that <BR>
27   *    an asset is being used in a certain process, avoiding the modification of <BR>
28   *    the file or its data in the database. <BR>
29   * </BLOCKQUOTE>
30   * </P>
31   *
32   * <P>
33   * Uses cache: no
34   *
35   * State Management Type: Stateless
36   * </P>
37   *
38   * Configurable properties in flexdm.properties: <BR>
39   * <BLOCKQUOTE>
40   * <P>
41   *    NONE <BR>
42   * </P>
43   * </BLOCKQUOTE>
44   *
45   */
46  public interface AssetsInProcess
47     extends EjbObject
48  {
49    final static String IDENTIFIER="$Id: AssetsInProcess.java,v 1.3 2003/08/11 02:22:31 aleric Exp $";
50  
51    /**
52       * Add assets to the ASSETS_INPROCESS table.
53      * Transaction Attribute: Required
54      * @param  actionData The data object containing assets to be added
55      * @return list of assets not added because they are already in process,
56     *         an empty vector if all assets were added, or null if no assets
57     *         were available for insert.
58      *
59      * @exception EjbException   if there is a problem adding the information to the database
60      * @exception RemoteException  if there is a problem with the EJB Server
61     */
62    public Vector addAssets( ActionData actionData )
63       throws EjbException, java.rmi.RemoteException;
64  
65     /**
66      * Delete assets from the ASSETS_INPROCESS table.
67      * Transaction Attribute: Required
68      * @param  nTransId Transaction Id of assets to be deleted
69      * @return true if deletion completed successfully, false otherwise.
70      *
71      * @exception EjbException   if there is a problem deleting the information from the database
72      * @exception RemoteException  if there is a problem with the EJB Server
73      */
74     public boolean deleteAssets( int nTransId )
75        throws EjbException, java.rmi.RemoteException;
76  
77    /**
78      * Update assets in the ASSETS_INPROCESS table.
79      * Add assets to the ASSETS_INPROCESS table.
80      * Transaction Attribute: Required
81      * @param  actionData The data object containing assets to be added
82     * @return list of assets not updated because they don't meet the unique constraint,
83     *         an empty vector if all assets were updated, or null if no assets
84     *         were available for update.
85      *
86      * @exception EjbException   if there is a problem updating the information in the database
87      * @exception RemoteException  if there is a problem with the EJB Server
88     */
89    public Vector updateAssets( ActionData actionData )
90       throws EjbException, java.rmi.RemoteException;
91  
92    /**
93      * Get a list of assets which are in process. The search is executed by file name.
94      * Transaction Attribute: Not Supported
95      * @param  saFileNames file names to use in the search 
96      * @return a Hashtable where key = file name; value = String Array { asset_id, server, location }
97      *
98      * @exception EjbException   if there is a problem obtaining the information from the database
99      * @exception RemoteException  if there is a problem with the EJB Server
100    */
101   public Hashtable getAssetsInProcessByFileName( String[] saFileNames )
102      throws EjbException, java.rmi.RemoteException;
103 }