Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Business Rules Java API Reference 10g Release 3 (10.1.3) B19040-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.rules.sdk.repository
Interface RuleRepository

public interface RuleRepository

This interface provides a common API to access rule definitions stored in repository.

Method Summary
`void` | `close()` It is the place for the repository to release any resources used.
`boolean` | `exists(java.lang.String dictName, java.lang.String markerName)` Query whether a dictioanry with given name and marker name exists in the repository.
`void` | `exportDictionary(java.lang.String dictName, java.lang.String markerName, java.net.URL exportDestination)` Export a dictionary associated with the given marker in the repository to a file.
`void` | `exportDictionary(java.lang.String dictName, java.net.URL exportDestination)` Export all versions of the selected dictionary in the repository.
`java.lang.String` | `getDictionaryDescription(java.lang.String dictName)` Get description about a particular dictionary.
`java.util.List` | `getDictionaryNames()` Get names of dictionaries stored in the repository
`java.lang.String` | `getMarkerDescription(java.lang.String dictName, java.lang.String markerName)` Get description about a particular marker
`java.util.List` | `getMarkerNames(java.lang.String dictName)` get list of marker names for a dictionary from the repository
`RepositoryContext` | `getRepositoryContext()` Get context for repository
`RepositoryType` | `getRepositoryType()` Get the RuleRepository type.
`void` | `importDictionaries(java.net.URL dictionariesLocation)` Import a dictionary into a repository.
`void` | `init(RepositoryContext repoCtx)` Initialize the repository by passing security and configuration information.
`RuleDictionary` | `loadDictionary(java.lang.String dictName)` Load a dictionary from the repository, By default, the most recent dictionary is opened.
`RuleDictionary` | `loadDictionary(java.lang.String dictName, java.lang.String markerName)` Load a dictionary associated with a given marker from the repository,
`void` | `mark(java.lang.String newMarkerName, java.lang.String dictName)` mark the latest content of selected dictionary in the repository
`void` | `mark(java.lang.String newMarkerName, java.lang.String dictName, java.lang.String currentMarkerName)` mark a dictionary with given name and marker name in the repository
`void` | `remove(java.lang.String dictName)` Remove all version of the dictionary from repository.
`void` | `remove(java.lang.String dictName, java.lang.String markerName)` Remove a dictionary associated with a given marker from repository.
`void` | `save(RuleDictionary dictionary)` Save a dictionary to repository.
`void` | `saveAs(RuleDictionary dictionary, java.lang.String newDictionaryName, java.lang.String newMarkerName)` Save a dictionary to repository.

Method Detail

### getRepositoryType

    public RepositoryType getRepositoryType()

  Get the RuleRepository type. The type is to identify a repository implementation. The type information is built when the repository implementation is registered.
  Returns:
    type of the repository

### init

    public void init(RepositoryContext repoCtx)
              throws RepositoryException

  Initialize the repository by passing security and configuration information. Repository users must call this method first before performing any repository operations.
  Parameters:
    `repoCtx` - an instance of the RepositoryContext object, which includes security and repository configuraiton information.
  Throws:
    `an` - exception occured when the repository initialization fails
    `RepositoryException`

### getRepositoryContext

    public RepositoryContext getRepositoryContext()

  Get context for repository
  Returns:
    RepositoryContext object

### getDictionaryNames

    public java.util.List getDictionaryNames()
                                      throws RepositoryException

  Get names of dictionaries stored in the repository
  Returns:
    a list of dictionary names, empty list if no dictionary in repository
  Throws:
    `an` - exception occured when accessing the repository
    `RepositoryException`

### exists

    public boolean exists(java.lang.String dictName,
                          java.lang.String markerName)
                   throws RepositoryException

  Query whether a dictioanry with given name and marker name exists in the repository.
  Parameters:
    `dictName` - name of the dictioanry
    `markerName` - marker name of the dictionary
  Returns:
    true if a dictioanry with given name and marker name exists in the repository. otherwise, false.
  Throws:
    `an` - exception occured when accessing the repository
    `RepositoryException`

### loadDictionary

    public RuleDictionary loadDictionary(java.lang.String dictName)
                                  throws RepositoryException

  Load a dictionary from the repository, By default, the most recent dictionary is opened.
  Parameters:
    `dictName` - name of the dictionary
  Returns:
    an instance of dictionary object
  Throws:
    `an` - exception occured when loading the dictionary
    `RepositoryException`

### save

    public void save(RuleDictionary dictionary)
              throws DictionaryAlreadyExistsException,
                     RepositoryException

  Save a dictionary to repository. If the dictionary does not exist in the repository, the dictionary documents will be created in the repository. If the dictionary exists in the repository, the most recent version will be replaced by the new dictionary.
  Parameters:
    `dictionary` - the dictionary to be saved
  Throws:
    `RepositoryException` - an exception occured when the repository is not able to successfully save the dictionary
    `DictionaryAlreadyExistsException`

### saveAs

    public void saveAs(RuleDictionary dictionary,
                       java.lang.String newDictionaryName,
                       java.lang.String newMarkerName)
                throws DictionaryAlreadyExistsException,
                       RepositoryException

  Save a dictionary to repository. If a dictionary with the same name and marker exists in the repository, a DictionaryAlreadyExistsException will be thrown. Otherwise, the dictionary content will be saved with given name and version. Note dictioanry and marker names are case-insnesitive.
  Parameters:
    `dictionary` - the dictionary to be saved
    `newDictionaryName` - name of the dictionary to be saved
    `newMarkerName` - new marker name.
  Throws:
    `DictionaryAlreadyExistsException` - an exception occured when a dictionary with the same name and maker name already existis in the repository.
    `RepositoryException` - an exception occured when the repository is not able to successfully save the dictionary

### remove

    public void remove(java.lang.String dictName)
                throws RepositoryException

  Remove all version of the dictionary from repository.
  Parameters:
    `dictName` - name of the dictionary to be removed
  Throws:
    `RepositoryException` - an exception occured if the dicitonary can not be removed

### close

    public void close()
               throws RepositoryException

  It is the place for the repository to release any resources used.
  Throws:
    `RepositoryException` - an exception occured during closing the repository

### exportDictionary

    public void exportDictionary(java.lang.String dictName,
                                 java.lang.String markerName,
                                 java.net.URL exportDestination)
                          throws RepositoryException

  Export a dictionary associated with the given marker in the repository to a file. If the file already exsits, the new exported content will be added to the existing file.
  Parameters:
    `dictName` - name of the dictioanry to be exported
    `markerName` - the marker to be exported
    `exportDestination` - the URL locating the exported jar file. The URL must be a file:URL. e.g. the URL can be obtained by new File(jarpath).toURL().
  Throws:
    `RepositoryException` - an exception occured while exporting the dictioanry

### exportDictionary

    public void exportDictionary(java.lang.String dictName,
                                 java.net.URL exportDestination)
                          throws RepositoryException

  Export all versions of the selected dictionary in the repository. If the file already exsits, the new exported content will be added to the existing file.
  Parameters:
    `dictName` - name of the dictionary to be exported
    `exportDestination` - the URL locating the exported jar file. The URL must be a file:URL. e.g. the URL can be obtained by new File(jarpath).toURL().
  Throws:
    `RepositoryException` - an exception occured while exporting the repository

### importDictionaries

    public void importDictionaries(java.net.URL dictionariesLocation)
                            throws DictionaryAlreadyExistsException,
                                   RepositoryException

  Import a dictionary into a repository. Overwrite the dictionary with the same name.
  Parameters:
    `dictionariesLocation` - URL locating a dictionary to be imported. The URL must be a file:URL. e.g. the URL can be obtained by new File(jarpath).toURL().
  Throws:
    `DictionaryAlreadyExistsException` - an exception occured when a dictionary with the same name and maker name already existis in the repository.
    `RepositoryException` - an exception occured while importing the dictionary

### mark

    public void mark(java.lang.String newMarkerName,
                     java.lang.String dictName)
              throws RepositoryException

  mark the latest content of selected dictionary in the repository
  Parameters:
    `newMarkerName` - name of the marker to be created
    `dictName` - name of the dictionary to be marked
  Throws:
    `RepositoryException` - an exception occured when marking the dictionary

### mark

    public void mark(java.lang.String newMarkerName,
                     java.lang.String dictName,
                     java.lang.String currentMarkerName)
              throws RepositoryException

  mark a dictionary with given name and marker name in the repository
  Parameters:
    `newMarkerName` - name of the marker to be created
    `dictName` - name of the dictionary to be marked
    `currentMarkerName` - current marker name of the dictionary to be marked
  Throws:
    `RepositoryException` - an exception occured when marking the dictionary

### getMarkerNames

    public java.util.List getMarkerNames(java.lang.String dictName)
                                  throws RepositoryException

  get list of marker names for a dictionary from the repository
  Parameters:
    `dictName` - name of the dictionary against which the associated markers are queried
  Returns:
    a list of marker names associated with the given dictionary
  Throws:
    `an` - exception occured when getting marker names
    `RepositoryException`

### loadDictionary

    public RuleDictionary loadDictionary(java.lang.String dictName,
                                         java.lang.String markerName)
                                  throws RepositoryException

  Load a dictionary associated with a given marker from the repository,
  Parameters:
    `dictName` - name of the dictionary
    `markerName` - name of the marker
  Returns:
    an instance of dictionary object matching the dictionay name and marker name
  Throws:
    `an` - exception occured when loading the dictionary
    `RepositoryException`

### remove

    public void remove(java.lang.String dictName,
                       java.lang.String markerName)
                throws RepositoryException

  Remove a dictionary associated with a given marker from repository.
  Parameters:
    `dictName` - name of the dictionary to be removed
    `markerName` - name of the marker
  Throws:
    `RepositoryException` - an exception occured if the dicitonary can not be removed

### getDictionaryDescription

    public java.lang.String getDictionaryDescription(java.lang.String dictName)
                                              throws RepositoryException

  Get description about a particular dictionary.
  Parameters:
    `dictName` - name of the dictionary
  Throws:
    `RepositoryException` - an exception occured when getting the description if the dicitonary can not be removed

### getMarkerDescription

    public java.lang.String getMarkerDescription(java.lang.String dictName,
                                                 java.lang.String markerName)
                                          throws RepositoryException

  Get description about a particular marker
  Parameters:
    `dictName` - name of the dictionary
    `markerName` - name of the marker
  Throws:
    `RepositoryException` - an exception occured when getting the description

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Business Rules Java API Reference 10g Release 3 (10.1.3) B19040-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006, Oracle. All rights reserved.