org.openl.rules.repository
Interface RFolder

All Superinterfaces:
REntity

public interface RFolder
extends REntity

OpenL Rules Folder. It can have sub folders and files. Sub folders and files are treated separately.

Author:
Aleh Bykhavets

Method Summary
 RFile createFile(String name)
          Creates file to the folder.
 RFolder createFolder(String name)
          Creates sub folder to the folder.
 void delete()
          Deletes the folder, sub folders and all files.
 List<RFile> getFiles()
          Gets list of files from the folder.
 List<RFolder> getFolders()
          Gets list of sub folders.
 
Methods inherited from interface org.openl.rules.repository.REntity
addProperty, getActiveVersion, getEffectiveDate, getExpirationDate, getLineOfBusiness, getName, getPath, getProperties, getProperty, getProps, getVersionHistory, hasProperty, removeProperty, setEffectiveDate, setExpirationDate, setLineOfBusiness, setProps
 

Method Detail

createFile

RFile createFile(String name)
                 throws RRepositoryException
Creates file to the folder.

Parameters:
name - name of new file
Returns:
newly created file
Throws:
RRepositoryException - if failed

createFolder

RFolder createFolder(String name)
                     throws RRepositoryException
Creates sub folder to the folder.

Parameters:
name - name of new folder
Returns:
newly created folder
Throws:
RRepositoryException - if failed

delete

void delete()
            throws RRepositoryException
Deletes the folder, sub folders and all files.

Root folder cannot be deleted. Still, on delete it removes all its content, i.e. sub folders and all files.

Specified by:
delete in interface REntity
Throws:
RRepositoryException

getFiles

List<RFile> getFiles()
                     throws RRepositoryException
Gets list of files from the folder.

Returns:
list of files
Throws:
RRepositoryException

getFolders

List<RFolder> getFolders()
                         throws RRepositoryException
Gets list of sub folders. It returns direct descendants only.

Returns:
list of sub folders.
Throws:
RRepositoryException


Copyright © 2010. All Rights Reserved.