org.openl.rules.repository
Class NullRepository

java.lang.Object
  extended by org.openl.rules.repository.NullRepository
All Implemented Interfaces:
RRepository

public class NullRepository
extends Object
implements RRepository

Stub to use when repository cannot be initialized.

Author:
Aleh Bykhavets

Constructor Summary
NullRepository()
           
 
Method Summary
 RDeploymentDescriptorProject createDDProject(String name)
           
 RProject createProject(String name)
          Creates a project in the repository.
protected  void fail()
           
 RDeploymentDescriptorProject getDDProject(String name)
           
 List<RDeploymentDescriptorProject> getDDProjects()
           
 String getName()
          Returns name of the repository.
 RProject getProject(String name)
          Gets project by name.
 List<RProject> getProjects()
          Gets list of projects from the repository.
 List<RProject> getProjects4Deletion()
          Gets list of projects from the repository that are marked for deletion.
 boolean hasDDProject(String name)
           
 boolean hasProject(String name)
          Checks whether project with given name exists in the repository.
 void release()
          Releases resources allocated by this Rules Repository instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullRepository

public NullRepository()
Method Detail

createDDProject

public RDeploymentDescriptorProject createDDProject(String name)
                                             throws RRepositoryException
Specified by:
createDDProject in interface RRepository
Throws:
RRepositoryException

createProject

public RProject createProject(String name)
                       throws RRepositoryException
Description copied from interface: RRepository
Creates a project in the repository. Name of new project must be unique.

Specified by:
createProject in interface RRepository
Parameters:
name - name of new project
Returns:
newly created project
Throws:
RRepositoryException - if failed

fail

protected void fail()
             throws RRepositoryException
Throws:
RRepositoryException

getDDProject

public RDeploymentDescriptorProject getDDProject(String name)
                                          throws RRepositoryException
Specified by:
getDDProject in interface RRepository
Throws:
RRepositoryException

getDDProjects

public List<RDeploymentDescriptorProject> getDDProjects()
                                                 throws RRepositoryException
Specified by:
getDDProjects in interface RRepository
Throws:
RRepositoryException

getName

public String getName()
Description copied from interface: RRepository
Returns name of the repository. It can be type of repository plus location.

Specified by:
getName in interface RRepository
Returns:
name of repository

getProject

public RProject getProject(String name)
                    throws RRepositoryException
Description copied from interface: RRepository
Gets project by name.

Specified by:
getProject in interface RRepository
Returns:
project
Throws:
RRepositoryException - if failed or no project with specified name

getProjects

public List<RProject> getProjects()
                           throws RRepositoryException
Description copied from interface: RRepository
Gets list of projects from the repository.

Specified by:
getProjects in interface RRepository
Returns:
list of projects
Throws:
RRepositoryException - if failed

getProjects4Deletion

public List<RProject> getProjects4Deletion()
                                    throws RRepositoryException
Description copied from interface: RRepository
Gets list of projects from the repository that are marked for deletion.

Specified by:
getProjects4Deletion in interface RRepository
Returns:
list of projects that are marked for deletion
Throws:
RRepositoryException

hasDDProject

public boolean hasDDProject(String name)
                     throws RRepositoryException
Specified by:
hasDDProject in interface RRepository
Throws:
RRepositoryException

hasProject

public boolean hasProject(String name)
                   throws RRepositoryException
Description copied from interface: RRepository
Checks whether project with given name exists in the repository.

Specified by:
hasProject in interface RRepository
Returns:
true if project with such name exists
Throws:
RRepositoryException

release

public void release()
Description copied from interface: RRepository
Releases resources allocated by this Rules Repository instance.

Specified by:
release in interface RRepository


Copyright © 2010. All Rights Reserved.