org.talend.repository.model
Interface IRepositoryFactory

All Known Implementing Classes:
AbstractEMFRepositoryFactory, AbstractRepositoryFactory, LocalRepositoryFactory

public interface IRepositoryFactory

Defines all methods that a repository provider plug-in must provides to client.
$Id: IRepositoryFactory.java 3008 2007-04-10 09:18:10 +0000 (mar., 10 avr. 2007) smallet $


Method Summary
 Item copy(Item item, org.eclipse.core.runtime.IPath path)
           
 void create(Item item, org.eclipse.core.runtime.IPath path)
           
 Folder createFolder(ERepositoryObjectType type, org.eclipse.core.runtime.IPath path, java.lang.String label)
           
 Project createProject(java.lang.String label, java.lang.String description, ECodeLanguage language, User author)
           
 void deleteFolder(ERepositoryObjectType type, org.eclipse.core.runtime.IPath path)
           
 void deleteObjectLogical(IRepositoryObject objToDelete)
          Deletes logically the given object.
 void deleteObjectPhysical(IRepositoryObject objToDelete)
          Deletes physically the given object.
 java.util.List<IRepositoryObject> getAll(ERepositoryObjectType type, boolean withDeleted)
          Returns all object of a given type.
 java.util.List<IRepositoryObject> getAllVersion(java.lang.String id)
          Returns all version of an object given its id.
 RootContainer<java.lang.String,IRepositoryObject> getBusinessProcess()
           
 RootContainer<java.lang.String,IRepositoryObject> getContext()
           
 java.util.List<ContextItem> getContextItem()
          get all context items.
 RootContainer<java.lang.String,IRepositoryObject> getDocumentation()
           
 java.util.List<Status> getDocumentationStatus()
           
 java.util.List<DynamicFieldBean> getFields()
           
 java.lang.String getId()
           
 IRepositoryObject getLastVersion(java.lang.String id)
          Returns last version of an object given its id.
 RootContainer<java.lang.String,IRepositoryObject> getMetadataConnection()
           
 java.util.List<ConnectionItem> getMetadataConnectionsItem()
          gather all the metadata connections (file / db / etc ...).
 RootContainer<java.lang.String,IRepositoryObject> getMetadataFileDelimited()
           
 RootContainer<java.lang.String,IRepositoryObject> getMetadataFileLdif()
           
 RootContainer<java.lang.String,IRepositoryObject> getMetadataFilePositional()
           
 RootContainer<java.lang.String,IRepositoryObject> getMetadataFileRegexp()
           
 RootContainer<java.lang.String,IRepositoryObject> getMetadataFileXml()
           
 java.lang.String getName()
           
 java.lang.String getNextId()
           
 RootContainer<java.lang.String,IRepositoryObject> getProcess()
           
 java.util.List<Project> getReferencedProjects()
           
 RootContainer<java.lang.String,IRepositoryObject> getRoutine()
           
 ERepositoryStatus getStatus(Item item)
           
 java.util.List<Status> getTechnicalStatus()
           
 void initialize()
           
 boolean isAuthenticationNeeded()
           
 boolean isNameAvailable(Item item, java.lang.String name)
          Returns if the name is used by another item of the same type.
 boolean isPathValid(ERepositoryObjectType type, org.eclipse.core.runtime.IPath path, java.lang.String label)
           
 java.lang.String isServerValid()
           
 void lock(Item item)
           
 void logOnProject(Project project)
           
 void moveFolder(ERepositoryObjectType type, org.eclipse.core.runtime.IPath sourcePath, org.eclipse.core.runtime.IPath targetPath)
           
 void moveObject(IRepositoryObject objToMove, org.eclipse.core.runtime.IPath newPath)
           
 Project[] readProject()
           
 Property reload(Property property)
          DOC mhelleboid Comment method "cancel".
 void renameFolder(ERepositoryObjectType type, org.eclipse.core.runtime.IPath path, java.lang.String label)
           
 void restoreObject(IRepositoryObject objToRestore, org.eclipse.core.runtime.IPath path)
          Restore a logically deleted object.
 void save(Item item)
           
 void save(Property property)
           
 void setAuthenticationNeeded(boolean aBnthenticationNeeded)
           
 void setDocumentationStatus(java.util.List<Status> list)
           
 void setFields(java.util.List<DynamicFieldBean> fields)
           
 void setId(java.lang.String id)
           
 void setMigrationTasksDone(Project project, java.util.List<java.lang.String> list)
           
 void setName(java.lang.String name)
           
 void setTechnicalStatus(java.util.List<Status> list)
           
 void unlock(Item obj)
           
 

Method Detail

getId

java.lang.String getId()

setId

void setId(java.lang.String id)

getName

java.lang.String getName()

setName

void setName(java.lang.String name)

getFields

java.util.List<DynamicFieldBean> getFields()

setFields

void setFields(java.util.List<DynamicFieldBean> fields)

isAuthenticationNeeded

boolean isAuthenticationNeeded()

setAuthenticationNeeded

void setAuthenticationNeeded(boolean aBnthenticationNeeded)

initialize

void initialize()

logOnProject

void logOnProject(Project project)
                  throws LoginException,
                         PersistenceException
Throws:
LoginException
PersistenceException

getNextId

java.lang.String getNextId()

createProject

Project createProject(java.lang.String label,
                      java.lang.String description,
                      ECodeLanguage language,
                      User author)
                      throws PersistenceException
Throws:
PersistenceException

readProject

Project[] readProject()
                      throws PersistenceException,
                             BusinessException
Throws:
PersistenceException
BusinessException

createFolder

Folder createFolder(ERepositoryObjectType type,
                    org.eclipse.core.runtime.IPath path,
                    java.lang.String label)
                    throws PersistenceException
Throws:
PersistenceException

isNameAvailable

boolean isNameAvailable(Item item,
                        java.lang.String name)
                        throws PersistenceException
Returns if the name is used by another item of the same type. Type, name and id of item are used to test label availability. Implementations should be updated when folder are treated as Items.

Parameters:
item -
name - TODO
Returns:
true if the name is not used an so is available.
Throws:
PersistenceException

isPathValid

boolean isPathValid(ERepositoryObjectType type,
                    org.eclipse.core.runtime.IPath path,
                    java.lang.String label)
                    throws PersistenceException
Throws:
PersistenceException

deleteFolder

void deleteFolder(ERepositoryObjectType type,
                  org.eclipse.core.runtime.IPath path)
                  throws PersistenceException
Throws:
PersistenceException

moveFolder

void moveFolder(ERepositoryObjectType type,
                org.eclipse.core.runtime.IPath sourcePath,
                org.eclipse.core.runtime.IPath targetPath)
                throws PersistenceException
Throws:
PersistenceException

renameFolder

void renameFolder(ERepositoryObjectType type,
                  org.eclipse.core.runtime.IPath path,
                  java.lang.String label)
                  throws PersistenceException
Throws:
PersistenceException

getAllVersion

java.util.List<IRepositoryObject> getAllVersion(java.lang.String id)
                                                throws PersistenceException
Returns all version of an object given its id.

Parameters:
project - - the current project
id - - the id to look for
Returns:
a list (may be empty) of all version
Throws:
PersistenceException

getLastVersion

IRepositoryObject getLastVersion(java.lang.String id)
                                 throws PersistenceException
Returns last version of an object given its id.

Parameters:
project - - the current project
id - - the id to look for
Returns:
the most recent version of object with this id or null if no object with this id has been found
Throws:
PersistenceException

getAll

java.util.List<IRepositoryObject> getAll(ERepositoryObjectType type,
                                         boolean withDeleted)
                                         throws PersistenceException
Returns all object of a given type.
Only the most recent version of each object is returned.

Parameters:
project - - the current project
type - - the type
Returns:
a list of all objects of type type in the repository in the project
Throws:
PersistenceException

deleteObjectLogical

void deleteObjectLogical(IRepositoryObject objToDelete)
                         throws PersistenceException
Deletes logically the given object. isDeleted on this object will now returned true.

Parameters:
project - - the current project
objToDelete - - the objet to delete
deletionAuthor - - the user perfom the deletion (only for logging in this version)
Throws:
PersistenceException

deleteObjectPhysical

void deleteObjectPhysical(IRepositoryObject objToDelete)
                          throws PersistenceException
Deletes physically the given object. Object cannot be retrieved.

Parameters:
project - - the current project
objToDelete - - the objet to delete
deletionAuthor - - the user perfom the deletion (only for logging in this version)
Throws:
PersistenceException

restoreObject

void restoreObject(IRepositoryObject objToRestore,
                   org.eclipse.core.runtime.IPath path)
                   throws PersistenceException
Restore a logically deleted object. isDeleted on this object will now returned false.

Parameters:
project - - the current project
objToRestore - - the object to restore
path - - the path to restore the object. Cannot be null. Path is relative to root type folder.
restorationAuthor - - the user perfom the restoration (only for logging in this version)
Throws:
PersistenceException

moveObject

void moveObject(IRepositoryObject objToMove,
                org.eclipse.core.runtime.IPath newPath)
                throws PersistenceException
Throws:
PersistenceException

lock

void lock(Item item)
          throws PersistenceException,
                 BusinessException
Throws:
PersistenceException
BusinessException

unlock

void unlock(Item obj)
            throws PersistenceException
Throws:
PersistenceException

getStatus

ERepositoryStatus getStatus(Item item)

getTechnicalStatus

java.util.List<Status> getTechnicalStatus()
                                          throws PersistenceException
Throws:
PersistenceException

getDocumentationStatus

java.util.List<Status> getDocumentationStatus()
                                              throws PersistenceException
Throws:
PersistenceException

setTechnicalStatus

void setTechnicalStatus(java.util.List<Status> list)
                        throws PersistenceException
Throws:
PersistenceException

setDocumentationStatus

void setDocumentationStatus(java.util.List<Status> list)
                            throws PersistenceException
Throws:
PersistenceException

setMigrationTasksDone

void setMigrationTasksDone(Project project,
                           java.util.List<java.lang.String> list)
                           throws PersistenceException
Throws:
PersistenceException

isServerValid

java.lang.String isServerValid()
                               throws BusinessException
Throws:
BusinessException

create

void create(Item item,
            org.eclipse.core.runtime.IPath path)
            throws PersistenceException
Throws:
PersistenceException

save

void save(Item item)
          throws PersistenceException
Throws:
PersistenceException

save

void save(Property property)
          throws PersistenceException
Throws:
PersistenceException

copy

Item copy(Item item,
          org.eclipse.core.runtime.IPath path)
          throws PersistenceException,
                 BusinessException
Throws:
PersistenceException
BusinessException

reload

Property reload(Property property)
                throws PersistenceException
DOC mhelleboid Comment method "cancel".

Parameters:
property -
Throws:
PersistenceException

getBusinessProcess

RootContainer<java.lang.String,IRepositoryObject> getBusinessProcess()
                                                                     throws PersistenceException
Throws:
PersistenceException

getDocumentation

RootContainer<java.lang.String,IRepositoryObject> getDocumentation()
                                                                   throws PersistenceException
Throws:
PersistenceException

getProcess

RootContainer<java.lang.String,IRepositoryObject> getProcess()
                                                             throws PersistenceException
Throws:
PersistenceException

getContext

RootContainer<java.lang.String,IRepositoryObject> getContext()
                                                             throws PersistenceException
Throws:
PersistenceException

getRoutine

RootContainer<java.lang.String,IRepositoryObject> getRoutine()
                                                             throws PersistenceException
Throws:
PersistenceException

getMetadataConnection

RootContainer<java.lang.String,IRepositoryObject> getMetadataConnection()
                                                                        throws PersistenceException
Throws:
PersistenceException

getMetadataFileDelimited

RootContainer<java.lang.String,IRepositoryObject> getMetadataFileDelimited()
                                                                           throws PersistenceException
Throws:
PersistenceException

getMetadataFilePositional

RootContainer<java.lang.String,IRepositoryObject> getMetadataFilePositional()
                                                                            throws PersistenceException
Throws:
PersistenceException

getMetadataFileRegexp

RootContainer<java.lang.String,IRepositoryObject> getMetadataFileRegexp()
                                                                        throws PersistenceException
Throws:
PersistenceException

getMetadataFileXml

RootContainer<java.lang.String,IRepositoryObject> getMetadataFileXml()
                                                                     throws PersistenceException
Throws:
PersistenceException

getMetadataFileLdif

RootContainer<java.lang.String,IRepositoryObject> getMetadataFileLdif()
                                                                      throws PersistenceException
Throws:
PersistenceException

getMetadataConnectionsItem

java.util.List<ConnectionItem> getMetadataConnectionsItem()
                                                          throws PersistenceException
gather all the metadata connections (file / db / etc ...).

Throws:
PersistenceException

getContextItem

java.util.List<ContextItem> getContextItem()
                                           throws PersistenceException
get all context items.

Returns:
Throws:
PersistenceException

getReferencedProjects

java.util.List<Project> getReferencedProjects()