lumis.portal.file
Interface IFileDao

Package class diagram package IFileDao
All Known Implementing Classes:
FileDaoJdbc

public interface IFileDao

Interface for file persistance

Since:
4.0.0

Method Summary
 void add(FileConfig fileConfig, ITransaction transaction)
          Add the file.
 void delete(String fileId, ITransaction transaction)
          Delete the file.
 FileConfig get(String fileId, ITransaction transaction)
          Get the file.
 String getIdByItemInfo(String itemId, String serviceInstanceId, String sourceId, String fieldId, ITransaction transaction)
          Get the fileId refered by a content with the given ids.
 Collection<String> getIdsByFilesId(String filesId, ITransaction transaction)
          Return the file ids that belongs to the files with the given id.
 Collection<String> getIdsByFilesIdAndType(String filesId, int type, ITransaction transaction)
          Return the file ids that belongs to the files with the given id and with the given type.
 Collection<String> getIdsByServiceInstanceId(String serviceInstanceId, ITransaction transaction)
          Return the file ids that belongs to the specified service instance.
 int getNumberOfServiceInstanceFiles(String serviceInstanceId, ITransaction transaction)
          Returns the number of files for a service instance.
 void update(FileConfig fileConfig, ITransaction transaction)
          Updates the file's information.
 

Method Detail

add

void add(FileConfig fileConfig,
         ITransaction transaction)
         throws PortalException
Add the file.

Parameters:
fileConfig -
transaction -
Throws:
PortalException

get

FileConfig get(String fileId,
               ITransaction transaction)
               throws PortalException
Get the file.

Parameters:
fileId -
transaction -
Returns:
Throws:
DaoException
PortalException

delete

void delete(String fileId,
            ITransaction transaction)
            throws PortalException
Delete the file.

Parameters:
fileId -
transaction -
Throws:
DaoException
PortalException

update

void update(FileConfig fileConfig,
            ITransaction transaction)
            throws PortalException
Updates the file's information.

Parameters:
fileConfig -
transaction -
Throws:
PortalException

getIdsByFilesId

Collection<String> getIdsByFilesId(String filesId,
                                   ITransaction transaction)
                                   throws PortalException
Return the file ids that belongs to the files with the given id.

Parameters:
filesId - the id of the files.
transaction - the transaction for persistence access.
Returns:
the file ids.
Throws:
PortalException

getIdsByServiceInstanceId

Collection<String> getIdsByServiceInstanceId(String serviceInstanceId,
                                             ITransaction transaction)
                                             throws PortalException
Return the file ids that belongs to the specified service instance.

Parameters:
serviceInstanceId - the service instance's id.
transaction - the transaction for persistence access.
Returns:
the file ids.
Throws:
PortalException

getIdsByFilesIdAndType

Collection<String> getIdsByFilesIdAndType(String filesId,
                                          int type,
                                          ITransaction transaction)
                                          throws PortalException
Return the file ids that belongs to the files with the given id and with the given type.

Parameters:
filesId - the id of the files.
type - the type the returned files must have. The type value must be one of the TYPE constants available in FileConfig.
transaction - the transaction for persistence access.
Returns:
the file ids.
Throws:
PortalException

getIdByItemInfo

String getIdByItemInfo(String itemId,
                       String serviceInstanceId,
                       String sourceId,
                       String fieldId,
                       ITransaction transaction)
                       throws PortalException
Get the fileId refered by a content with the given ids.

Throws:
PortalException

getNumberOfServiceInstanceFiles

int getNumberOfServiceInstanceFiles(String serviceInstanceId,
                                    ITransaction transaction)
                                    throws PortalException
Returns the number of files for a service instance.

Parameters:
serviceInstanceId - the service instance identifier.
transaction - the transaction for persistence access.
Returns:
the number of files for the specified service instance.
Throws:
PortalException
Since:
4.2.0


Lumisportal  5.5.0.091130 - Copyright © 2001-2007, Lumis. All Rights Reserved.