org.openl.rules.repository
Interface REntity

All Known Subinterfaces:
RFile, RFolder, RProductionDeployment, RProject

public interface REntity

Abstract Entity. It defines common properties and methods for OpenL Rules Project/Folder/File.

Author:
Aleh Bykhavets

Method Summary
 void addProperty(String name, RPropertyType type, Object value)
           
 void delete()
          Deletes entity.
 RVersion getActiveVersion()
          Gets active version of the entity.
 Date getEffectiveDate()
          Gets effective date for rules entity.
 Date getExpirationDate()
          Gets expiration date for rules entity.
 String getLineOfBusiness()
          Gets line of business for rules entity.
 String getName()
          Gets name of the entity.
 String getPath()
          Returns path of entity.
 Collection<RProperty> getProperties()
           
 RProperty getProperty(String name)
           
 Map<String,Object> getProps()
           
 List<RVersion> getVersionHistory()
          Gets version history of the entity.
 boolean hasProperty(String name)
           
 void removeProperty(String name)
           
 void setEffectiveDate(Date date)
          Sets effective date for rules entity.
 void setExpirationDate(Date date)
          Sets expiration date for rules entity. expiration date can be disabled if null is passed.
 void setLineOfBusiness(String lineOfBusiness)
          Sets line of business for rules entity.
 void setProps(Map<String,Object> props)
           
 

Method Detail

addProperty

void addProperty(String name,
                 RPropertyType type,
                 Object value)
                 throws RRepositoryException
Throws:
RRepositoryException

delete

void delete()
            throws RRepositoryException
Deletes entity. Also can delete other entities. For example, deleting a folder will lead to deleting all its sub entities.

Throws:
RRepositoryException - if failed

getActiveVersion

RVersion getActiveVersion()
Gets active version of the entity.

Returns:
active version

getEffectiveDate

Date getEffectiveDate()
Gets effective date for rules entity. If effective date isn't set method returns null

Returns:
effective date or null

getExpirationDate

Date getExpirationDate()
Gets expiration date for rules entity. If expiration date isn't set method returns null

Returns:
expiration date or null

getLineOfBusiness

String getLineOfBusiness()
Gets line of business for rules entity. If line of business isn't set method returns null

Returns:
line of business or null

getName

String getName()
Gets name of the entity.

Returns:
name

getPath

String getPath()
               throws RRepositoryException
Returns path of entity.

Returns:
path of entity
Throws:
RRepositoryException - if failed

getProperties

Collection<RProperty> getProperties()

getProperty

RProperty getProperty(String name)
                      throws RRepositoryException
Throws:
RRepositoryException

getProps

Map<String,Object> getProps()

getVersionHistory

List<RVersion> getVersionHistory()
                                 throws RRepositoryException
Gets version history of the entity.

Returns:
list of versions
Throws:
RRepositoryException

hasProperty

boolean hasProperty(String name)

removeProperty

void removeProperty(String name)
                    throws RRepositoryException
Throws:
RRepositoryException

setEffectiveDate

void setEffectiveDate(Date date)
                      throws RRepositoryException
Sets effective date for rules entity. Effective date can be disabled if null is passed.

Parameters:
date - new effective date or null
Throws:
RRepositoryException - if failed

setExpirationDate

void setExpirationDate(Date date)
                       throws RRepositoryException
Sets expiration date for rules entity. expiration date can be disabled if null is passed.

Parameters:
date - new expiration date or null
Throws:
RRepositoryException - if failed

setLineOfBusiness

void setLineOfBusiness(String lineOfBusiness)
                       throws RRepositoryException
Sets line of business for rules entity. Line of business can be disabled if null is passed.

Throws:
RRepositoryException - if failed

setProps

void setProps(Map<String,Object> props)
              throws RRepositoryException
Throws:
RRepositoryException


Copyright © 2010. All Rights Reserved.