Style Intelligence v12.0

inetsoft.sree
Class RepletRegistry

java.lang.Object
  extended by inetsoft.sree.RepletRegistry
All Implemented Interfaces:
Serializable

public class RepletRegistry
extends Object
implements Serializable

RepletRegistry handles registration of replets. It loads the registration file from the location specified in the 'replet.repository.file' property.

See Also:
Serialized Form

Nested Class Summary
protected static class RepletRegistry.Folder
          Replet folder.
 
Field Summary
static String ADD_FOLDER_EVENT
          Add folder event.
static String ADD_REPLET_EVENT
          Add replet event.
static String CHANGE_EVENT
          Change event, per-transaction event, which should be fired after the change process is over.
protected  Hashtable contextmap
           
protected  long date
           
protected  inetsoft.util.DataChangeListenerManager dmgr
           
static String EDIT_CYCLE_EVENT
          Edit cycle event.
protected  Hashtable filefoldermap
           
protected  Hashtable filemap
           
protected  Hashtable foldercontextmap
           
protected  Hashtable folders
           
protected  inetsoft.util.ReportKey key
           
protected  Vector listeners
           
protected  boolean noMyreports
           
protected  Vector prototypes
           
static String RELOAD_EVENT
          Reload event.
static String REMOVE_FOLDER_EVENT
          Remove folder event.
static String REMOVE_PROTOTYPE_EVENT
          Remove prototype event.
static String REMOVE_REPLET_EVENT
          Remove replet event.
static String RENAME_FOLDER_EVENT
          Rename folder event.
static String RENAME_REPLET_EVENT
          Rename replet event.
protected  Hashtable repletmap
           
protected  Vector replets
           
protected  Vector vlisteners
           
 
Constructor Summary
protected RepletRegistry()
          Create a new registry.
protected RepletRegistry(Object key)
          Create a new registry.
 
Method Summary
 boolean addFolder(String folder)
          Add a new folder.
 void addPropertyChangeListener(PropertyChangeListener listener)
          Add property change listener.
 void addVetoListener(ActionVetoListener listener)
          Add veto listenr.
 String changeFolder(String oldFolderName, String newFolderName)
          Change folder name.
 void changeReplet(String oname, String nname)
          Change a replet.
static void clear()
          Clear the cached registry.
static void clear(String user)
          Clear the cached registry.
 boolean deployReportFile(String repletName)
           
 boolean deployReportFile(String repletName, String destName)
          Copies over the report files template to sree.home/templates and deployes the report in the registry.
protected  void fireEvent(String src, String name, Object oval, Object nval)
          Fire property change event.
protected  void fireVetoEvent(String name, String action)
          Fire veto event.
 String[] getAllFolders()
          Get all folder names.
 String[] getAllFolders(boolean publicOnly)
          Get all folder names.
 String[] getAllPrototypes()
          Get the names of all prototypes.
 String[] getAllReplets()
          Get all replet names.
 String[] getAllReplets(boolean visibleOnly)
          Get all replet names.
 RepletRequest getDefaultRequest(String name)
          Get the default request for a replet.
 int getDirectFileCount()
          Get the number of directly file replets.
 String getExportFormats(String name)
          Get the export formasts for a replet.
 String getFolderAlias(String name)
          Get the description of a folder.
protected  FolderContext getFolderContext(String name)
           
 int getFolderCount()
          Get the number of folders registered in the registry.
 String getFolderDescription(String name)
          Get the description of a folder.
 String[] getFolders(String folder)
          Get sub folders of a folder.
 String[] getFolders(String folder, boolean publicOnly)
          Get sub folders of a folder.
 RepletRequest getInitRequest(String name)
          Get the initialization request for a replet.
protected  long getLastModified()
          Get the last modified.
 String getLayout(String name)
          Get the HTML layout method associated with a particular replet.
 String getPregeneratedCycle(String name)
          Get the Pregenerated Cycle name for a replet.
 String[] getPregeneratedReplets(String cycle)
          Get the replet name of a pregenerated replet.
 int getPriority(String name)
          Get the thread priority of the replet.
 int getPrototypeCount()
          Get the number of prototypes registered in the registry.
 RepletContext getPrototypeRepletContext(String name)
          Get replet context of a prototype.
static RepletRegistry getRegistry()
          Return a replet registry instance.
static RepletRegistry getRegistry(String userName)
          Return a replet registry instance.
protected  String getRegistryPath()
          Get registry path to save.
 String getRepletAlias(String name)
          Get the alias of a replet.
 String getRepletClass(String name)
          Get the class of a replet.
protected  RepletContext getRepletContext(String name)
          Get replet context of a replet or prototype.
 int getRepletCount()
          Get the number of replets registered in the registry.
 String getRepletDescription(String name)
          Get the description of a replet.
 String[] getReplets(String folder)
          Get replets of a folder.
 String getReportFilePath(String repletName)
          Returns a report file's physical file path.
 String getTemplate(String name)
          Get the template file name associated with a replet.
protected  void init()
          Init the registry.
 boolean isBursting(String name)
          Check if a replet is bursting report.
 boolean isFile(String name)
          Check if a replet is a direct file.
 boolean isFileFolder(String folder)
          Check if a folder is a report file folder.
 boolean isFolder(String folder)
          Check if is a folder.
 boolean isParamOnly(String name)
          Check if a replet is a parameters only report.
 boolean isPortlet(String name)
          Check if a replet is portlet.
 boolean isPregenerated(String name)
          Check if replet is pregenerated.
 boolean isPrototype(String name)
          Check if a registered report is a prototype (for analytic).
 boolean isReplet(String name)
          Check if a registered report is a regular replet.
 boolean isSystem(String name)
          Determines if a replet is a system replet.
 boolean isTemplate(String name)
          Check if a registered report is a template replet.
protected  boolean isValidRepletNode(Attributes attributes)
          Check if is valid replet node.
 boolean isVisible(String name)
          Check if a replet is visible.
protected  void load(InputStream repository)
           
 void loadReportFiles()
          Load the report fiels in the $(sree.home)/ReportFiles into the registry.
 InputStream loadTemplateStream(String name)
          Loads a report template as an input stream.
 void register(String name, String cls, String alias, String desc, String layout)
          Add a replet to the registry.
 void register(String name, String cls, String alias, String desc, String layout, int priority, RepletRequest init, RepletRequest def)
          Add a replet to the registry.
 void register(String name, String cls, String alias, String desc, String layout, RepletRequest init, RepletRequest def)
          Add a replet to the registry.
 void register(String name, String folder, String cls, String alias, String desc, String layout, int priority, RepletRequest init, RepletRequest def)
          Add a replet to the registry.
protected  void register(String name, String folder, String cls, String alias, String desc, String layout, int priority, RepletRequest init, RepletRequest def, boolean transaction)
          Add a replet to the registry.
 void register(String name, String folder, String cls, String alias, String desc, String layout, RepletRequest init, RepletRequest def)
          Add a replet to the registry.
 void registerPrototype(String name, String alias, String description, String layout, RepletRequest init, RepletRequest def, String template)
          Add a prototype to the registry.
 void registryDefault(String name)
          Registry a default prototype.
protected  void reload()
          Reload registry.
 boolean removeFolder(String folderName)
          Remove the folder and all the replets inside it.
protected  void removePortlet(String replet)
           
protected  void removePortlet(String replet, String user)
           
 void removePropertyChangeListener(PropertyChangeListener listener)
          Remove property change listener.
 boolean removePrototype(String name)
          Remove a prototype from the registry.
 void removeReplet(String name)
          Remove a replet from the registry.
protected  void removeReplet(String name, boolean transaction)
          Remove a replet from the registry.
 void removeReplet(String name, boolean transaction, boolean removeSrt)
          Remove a replet from the registry.
 boolean removeReportFile(String repletName)
          Removes a report file and its parant folder from memory but not from file system.
static void removeUser(String name)
          Remove a user.
 void removeVetoListener(ActionVetoListener listener)
          Remove veto listener.
static void renameUser(String oname, String nname)
          Rename a user.
 void save()
          Save the registry to a registry file.
protected  void savePortlet()
          Save portlet file which is useful to edit dashboard using jetspeed.
protected  void savePortlet(String user)
           
 void saveTemplateStream(String name, InputStream in)
          Saves a template stream into the registry.
 void setBursting(String name, boolean burst)
          Set if the replet is a bursting report.
 void setExportFormats(String name, String formats)
          Set the export formats of the replet.
 void setFile(String name, boolean df)
          Set if a replet is a direct file.
 void setFolderAlias(String name, String alias)
          Set the folder alias.
 void setFolderDescription(String name, String description)
          Set the folder descriptions.
 void setLayout(String name, String layout)
          Set the HTML Layout method on a per replet basis.
 void setParamOnly(String name, boolean paramOnly)
          Set the 'parameters only' flag of the replet.
 void setPortlet(String name, boolean portlet)
          Set if the replet is a portlet.
 void setPregenerated(String name, boolean pregenerated)
          Set if the replet is a pregenerated.
 void setPregeneratedCycle(String name, String ncycle)
          Set the pregenerated cycle of the replet.
 void setPregeneratedCycle(String name, String ncycle, boolean transaction)
          Set the pregenerated cycle of the replet.
 void setPriority(String name, int priority)
          Set the thread priority of the replet.
 void setRepletAlias(String name, String alias)
          Set the replet alias.
 void setRepletClass(String name, String cls)
          Set the class of a replet.
 void setRepletDescription(String name, String description)
          Set the replet descriptions.
 void setRepletRequest(String name, RepletRequest req)
          Set the replet request (either INIT or CREATE) for the replet.
 void setSystem(String name, boolean system)
          Sets whether a replet is a system replet.
 void setTemplate(String name, String template)
          Set the template of the replet.
 void setVisible(String name, boolean visible)
          Set the visibility of the replet.
protected  boolean uptodate()
          Check if should always keep uptodate, true to add data change listener.
protected  void writeFoldersAndProtos(PrintWriter writer)
          Write folder and prototypes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ADD_REPLET_EVENT

public static final String ADD_REPLET_EVENT
Add replet event.

See Also:
Constant Field Values

ADD_FOLDER_EVENT

public static final String ADD_FOLDER_EVENT
Add folder event.

See Also:
Constant Field Values

RENAME_REPLET_EVENT

public static final String RENAME_REPLET_EVENT
Rename replet event.

See Also:
Constant Field Values

RENAME_FOLDER_EVENT

public static final String RENAME_FOLDER_EVENT
Rename folder event.

See Also:
Constant Field Values

REMOVE_REPLET_EVENT

public static final String REMOVE_REPLET_EVENT
Remove replet event.

See Also:
Constant Field Values

REMOVE_PROTOTYPE_EVENT

public static final String REMOVE_PROTOTYPE_EVENT
Remove prototype event.

See Also:
Constant Field Values

REMOVE_FOLDER_EVENT

public static final String REMOVE_FOLDER_EVENT
Remove folder event.

See Also:
Constant Field Values

EDIT_CYCLE_EVENT

public static final String EDIT_CYCLE_EVENT
Edit cycle event.

See Also:
Constant Field Values

RELOAD_EVENT

public static final String RELOAD_EVENT
Reload event.

See Also:
Constant Field Values

CHANGE_EVENT

public static final String CHANGE_EVENT
Change event, per-transaction event, which should be fired after the change process is over. It's useful for listeners like to be notified but not care how when replet registry changes.

See Also:
Constant Field Values

noMyreports

protected boolean noMyreports

replets

protected Vector replets

prototypes

protected Vector prototypes

folders

protected Hashtable folders

repletmap

protected Hashtable repletmap

contextmap

protected Hashtable contextmap

foldercontextmap

protected Hashtable foldercontextmap

filemap

protected Hashtable filemap

filefoldermap

protected Hashtable filefoldermap

listeners

protected Vector listeners

vlisteners

protected Vector vlisteners

dmgr

protected inetsoft.util.DataChangeListenerManager dmgr

date

protected long date

key

protected inetsoft.util.ReportKey key
Constructor Detail

RepletRegistry

protected RepletRegistry()
                  throws Exception
Create a new registry.

Throws:
Exception

RepletRegistry

protected RepletRegistry(Object key)
                  throws Exception
Create a new registry.

Throws:
Exception
Method Detail

getRegistry

public static RepletRegistry getRegistry()
                                  throws Exception
Return a replet registry instance.

Throws:
Exception

getRegistry

public static RepletRegistry getRegistry(String userName)
                                  throws Exception
Return a replet registry instance. If userName is not null the returned registry will represent the user's "My Reports" folder.

Throws:
Exception

removeUser

public static void removeUser(String name)
                       throws Exception
Remove a user.

Parameters:
name - the name of the specified user.
Throws:
Exception

renameUser

public static void renameUser(String oname,
                              String nname)
                       throws Exception
Rename a user.

Parameters:
oname - the old name of the specified user.
nname - the new name of the specified user.
Throws:
Exception

clear

public static void clear()
Clear the cached registry. The next call to getRegistry() will reload the registry file. This should only be called by the admin, otherwise it may cause a synchronization problem.


clear

public static void clear(String user)
Clear the cached registry. The next call to getRegistry() will reload the registry file. This should only be called by the admin, otherwise it may cause a synchronization problem.


addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Add property change listener.


removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Remove property change listener.


fireEvent

protected void fireEvent(String src,
                         String name,
                         Object oval,
                         Object nval)
Fire property change event.


reload

protected void reload()
Reload registry.


uptodate

protected boolean uptodate()
Check if should always keep uptodate, true to add data change listener.


init

protected void init()
             throws Exception
Init the registry.

Throws:
Exception

load

protected void load(InputStream repository)
             throws Exception
Throws:
Exception

registryDefault

public void registryDefault(String name)
Registry a default prototype.


isValidRepletNode

protected boolean isValidRepletNode(Attributes attributes)
Check if is valid replet node.


loadReportFiles

public void loadReportFiles()
Load the report fiels in the $(sree.home)/ReportFiles into the registry.


loadTemplateStream

public InputStream loadTemplateStream(String name)
                               throws Exception
Loads a report template as an input stream.

Parameters:
name - the name of the replet in the repository
Returns:
an input stream. IMPORTANT: Be sure to close() the stream to free DataSpace locks if applicable.
Throws:
Exception

register

public void register(String name,
                     String cls,
                     String alias,
                     String desc,
                     String layout)
Add a replet to the registry. The replet name is treated as a composite of the folder name, if any, and the replet name. If replet already exists, then the existing RepletRequests (init and default) are used.

Parameters:
name - replet name.
cls - replet class name (fully qualified).
alias - replet alias.
desc - replet description.
layout - replet HTML layout: default, auto, css2, or table.

register

public void register(String name,
                     String cls,
                     String alias,
                     String desc,
                     String layout,
                     RepletRequest init,
                     RepletRequest def)
Add a replet to the registry. The replet name is treated as a composite of the folder name, if any, and the replet name.

Parameters:
name - replet name.
cls - replet class name (fully qualified).
alias - replet alias.
desc - replet description.
layout - replet HTML layout: default, auto, css2, or table.
init - initialization request.
def - default request.

register

public void register(String name,
                     String cls,
                     String alias,
                     String desc,
                     String layout,
                     int priority,
                     RepletRequest init,
                     RepletRequest def)
Add a replet to the registry. The replet name is treated as a composite of the folder name, if any, and the replet name.

Parameters:
name - replet name.
cls - replet class name (fully qualified).
alias - replet alias.
desc - replet description.
layout - replet HTML layout: default, auto, css2, or table.
priority - thread priority of the replet.
init - initialization request.
def - default request.

register

public void register(String name,
                     String folder,
                     String cls,
                     String alias,
                     String desc,
                     String layout,
                     RepletRequest init,
                     RepletRequest def)
Add a replet to the registry.

Parameters:
name - replet name.
folder - folder name of this replet.
cls - replet class name (fully qualified).
alias - replet alias.
desc - replet description.
layout - replet HTML layout: default, auto, css2, or table.
init - initialization request.
def - default request.

register

public void register(String name,
                     String folder,
                     String cls,
                     String alias,
                     String desc,
                     String layout,
                     int priority,
                     RepletRequest init,
                     RepletRequest def)
Add a replet to the registry.

Parameters:
name - replet name.
folder - folder name of this replet.
cls - replet class name (fully qualified).
alias - replet alias.
desc - replet description.
layout - replet HTML layout: default, auto, css2, or table.
priority - thread priority of the replet.
init - initialization request.
def - default request.

register

protected void register(String name,
                        String folder,
                        String cls,
                        String alias,
                        String desc,
                        String layout,
                        int priority,
                        RepletRequest init,
                        RepletRequest def,
                        boolean transaction)
Add a replet to the registry.


getReportFilePath

public String getReportFilePath(String repletName)
Returns a report file's physical file path.

Parameters:
repletName - the specified report file's replet name.
Returns:
the specified report file's physical file path.

removeReportFile

public boolean removeReportFile(String repletName)
Removes a report file and its parant folder from memory but not from file system.


deployReportFile

public boolean deployReportFile(String repletName)

deployReportFile

public boolean deployReportFile(String repletName,
                                String destName)
Copies over the report files template to sree.home/templates and deployes the report in the registry.

Note: The report will no longer be available under Report Files.

Parameters:
repletName - the specified report file's replet name.
Returns:
true if successful, false otherwise.

registerPrototype

public void registerPrototype(String name,
                              String alias,
                              String description,
                              String layout,
                              RepletRequest init,
                              RepletRequest def,
                              String template)
Add a prototype to the registry.

Parameters:
name - prototype name.
alias - prototype alias.
description - prototype description.
layout - prototype HTML layout: default, auto, css2, or table.
init - initialization request.
def - default request.
template - prototype template file.

isPrototype

public boolean isPrototype(String name)
Check if a registered report is a prototype (for analytic).


removePrototype

public boolean removePrototype(String name)
Remove a prototype from the registry.


getPrototypeCount

public int getPrototypeCount()
Get the number of prototypes registered in the registry.


getAllPrototypes

public String[] getAllPrototypes()
Get the names of all prototypes.


addVetoListener

public void addVetoListener(ActionVetoListener listener)
Add veto listenr.


removeVetoListener

public void removeVetoListener(ActionVetoListener listener)
Remove veto listener.


fireVetoEvent

protected void fireVetoEvent(String name,
                             String action)
                      throws Exception
Fire veto event. If any one of the veto listeners vetoes the action, it will throw an exception.

Throws:
Exception

getAllFolders

public String[] getAllFolders()
Get all folder names.

Returns:
all folder names.

getAllFolders

public String[] getAllFolders(boolean publicOnly)
Get all folder names.

Parameters:
publicOnly - true if only include pulic folder.
Returns:
all folder names.

removeFolder

public boolean removeFolder(String folderName)
Remove the folder and all the replets inside it.

Parameters:
folderName - folder.
Returns:
true if remove successfully.

addFolder

public boolean addFolder(String folder)
Add a new folder.

Parameters:
folder - the folder.
Returns:
true if add successfully.

getFolders

public String[] getFolders(String folder)
Get sub folders of a folder.


getFolders

public String[] getFolders(String folder,
                           boolean publicOnly)
Get sub folders of a folder.


changeFolder

public String changeFolder(String oldFolderName,
                           String newFolderName)
Change folder name.

Parameters:
oldFolderName - old folder name.
newFolderName - new folder name.
Returns:
true if change successfully, error message if not.

getFolderCount

public int getFolderCount()
Get the number of folders registered in the registry.


isReplet

public boolean isReplet(String name)
Check if a registered report is a regular replet.


isTemplate

public boolean isTemplate(String name)
Check if a registered report is a template replet.


removeReplet

public void removeReplet(String name)
Remove a replet from the registry.


removeReplet

protected void removeReplet(String name,
                            boolean transaction)
Remove a replet from the registry.


removeReplet

public void removeReplet(String name,
                         boolean transaction,
                         boolean removeSrt)
Remove a replet from the registry.


getAllReplets

public String[] getAllReplets()
Get all replet names.


getAllReplets

public String[] getAllReplets(boolean visibleOnly)
Get all replet names.

Parameters:
visibleOnly - true if only include visible replet.

getReplets

public String[] getReplets(String folder)
Get replets of a folder.


changeReplet

public void changeReplet(String oname,
                         String nname)
Change a replet.

Parameters:
oname - the old name of the replet.
nname - the new name of the replet.

getRepletContext

protected RepletContext getRepletContext(String name)
Get replet context of a replet or prototype.


getFolderContext

protected FolderContext getFolderContext(String name)

getPrototypeRepletContext

public RepletContext getPrototypeRepletContext(String name)
Get replet context of a prototype.


setRepletClass

public void setRepletClass(String name,
                           String cls)
Set the class of a replet. If is a template replet, this should be inetsoft.sree.TemplateReplet.

Parameters:
name - replet name.
cls - fully qualified replet class.

getRepletClass

public String getRepletClass(String name)
Get the class of a replet. If it is a template replet, returns inetsoft.sree.TemplateReplet.

Parameters:
name - replet name.
Returns:
replet class.

setRepletAlias

public void setRepletAlias(String name,
                           String alias)
Set the replet alias. The alias is used when displaying the replet on screen.

Parameters:
name - replet name.
alias - replet alias.

getRepletAlias

public String getRepletAlias(String name)
Get the alias of a replet.

Parameters:
name - replet name.
Returns:
replet alias.

isParamOnly

public boolean isParamOnly(String name)
Check if a replet is a parameters only report.

Parameters:
name - replet name.
Returns:
true if the replet is a parameters only report.

setParamOnly

public void setParamOnly(String name,
                         boolean paramOnly)
Set the 'parameters only' flag of the replet.

Parameters:
name - replet name.
paramOnly - true if the replet is a parameters only report.

setRepletDescription

public void setRepletDescription(String name,
                                 String description)
Set the replet descriptions.

Parameters:
name - replet name.
description - replet descriptions.

getRepletDescription

public String getRepletDescription(String name)
Get the description of a replet.

Parameters:
name - replet name.
Returns:
replet description.

setFolderAlias

public void setFolderAlias(String name,
                           String alias)
Set the folder alias.

Parameters:
name - folder name.
alias - folder alias.

getFolderAlias

public String getFolderAlias(String name)
Get the description of a folder.

Parameters:
name - folder name.
Returns:
folder description.

setFolderDescription

public void setFolderDescription(String name,
                                 String description)
Set the folder descriptions.

Parameters:
name - folder name.
description - folder descriptions.

getFolderDescription

public String getFolderDescription(String name)
Get the description of a folder.

Parameters:
name - folder name.
Returns:
folder description.

setVisible

public void setVisible(String name,
                       boolean visible)
Set the visibility of the replet.

Parameters:
name - replet name.
visible - true if the replet is visible.

isVisible

public boolean isVisible(String name)
Check if a replet is visible.

Parameters:
name - replet name.
Returns:
true if the replet is visible.

setSystem

public void setSystem(String name,
                      boolean system)
Sets whether a replet is a system replet. System replets are not directly used by the user and may not be modified.

Parameters:
name - the name of the replet.
system - true if the replet is a system replet.
Since:
8.5

isSystem

public boolean isSystem(String name)
Determines if a replet is a system replet. System replets are not directly used by the user and may not be modified.

Parameters:
name - the name of the replet.
Returns:
true if the replet is a system replet.
Since:
8.5

setPortlet

public void setPortlet(String name,
                       boolean portlet)
Set if the replet is a portlet.

Parameters:
name - replet name.
portlet - true if the replet is portlet.

isPortlet

public boolean isPortlet(String name)
Check if a replet is portlet.

Parameters:
name - replet name.
Returns:
true if the replet is portlet.

setBursting

public void setBursting(String name,
                        boolean burst)
Set if the replet is a bursting report.

Parameters:
name - replet name.
burst - true if the replet is a bursting report.

isBursting

public boolean isBursting(String name)
Check if a replet is bursting report.

Parameters:
name - replet name.
Returns:
true if the replet is bursting report.

setPregenerated

public void setPregenerated(String name,
                            boolean pregenerated)
Set if the replet is a pregenerated.

Parameters:
name - replet name.
pregenerated - true if the replet is pregenerated.

isPregenerated

public boolean isPregenerated(String name)
Check if replet is pregenerated.

Parameters:
name - replet name.
Returns:
true is the replet is pregenerated.

setPregeneratedCycle

public void setPregeneratedCycle(String name,
                                 String ncycle)
Set the pregenerated cycle of the replet.

Parameters:
name - replet name.
ncycle - pregenerated cycle name.

setPregeneratedCycle

public void setPregeneratedCycle(String name,
                                 String ncycle,
                                 boolean transaction)
Set the pregenerated cycle of the replet.


getPregeneratedCycle

public String getPregeneratedCycle(String name)
Get the Pregenerated Cycle name for a replet.

Parameters:
name - replet name.
Returns:
pregeneratedCycle name.

setExportFormats

public void setExportFormats(String name,
                             String formats)
Set the export formats of the replet.


getExportFormats

public String getExportFormats(String name)
Get the export formasts for a replet.

Parameters:
name - replet name.
Returns:
export formats of the replet.

setFile

public void setFile(String name,
                    boolean df)
Set if a replet is a direct file.

Parameters:
name - replet name.
df - true if the replet is file.

isFile

public boolean isFile(String name)
Check if a replet is a direct file.

Parameters:
name - replet name.
Returns:
true if the replet is directly file.

isFileFolder

public boolean isFileFolder(String folder)
Check if a folder is a report file folder.

A report folder contains at least one replet, and all the replets are generated from report files.

Parameters:
folder - the specified folder name.

isFolder

public boolean isFolder(String folder)
Check if is a folder.


setLayout

public void setLayout(String name,
                      String layout)
Set the HTML Layout method on a per replet basis. Layout may be 'auto', 'css-p' or 'table. The layout method is used in conjunction with the PageGenerator to determine the layout style.

Parameters:
name - replet name.
layout - the layout style.

getLayout

public String getLayout(String name)
Get the HTML layout method associated with a particular replet. Layout may be 'auto', 'css-p' or 'table'. The layout method is used in conjunction with the PageGenerator to determine the layout style.

Parameters:
name - replet name.
Returns:
String layout style.

setTemplate

public void setTemplate(String name,
                        String template)
Set the template of the replet. If a template is registered, inetsoft.sree.TemplateReplet is used to create the replet.

Parameters:
name - replet name.
template - template resource name.

getTemplate

public String getTemplate(String name)
Get the template file name associated with a replet.

Parameters:
name - replet name.
Returns:
replet template resource name.

setPriority

public void setPriority(String name,
                        int priority)
Set the thread priority of the replet.

Parameters:
name - replet name.
priority - replet priority.

getPriority

public int getPriority(String name)
Get the thread priority of the replet.

Parameters:
name - replet name.
Returns:
replet thread priority.

getDefaultRequest

public RepletRequest getDefaultRequest(String name)
Get the default request for a replet. This is the request used to create the initial report and contains creation parameters.

Parameters:
name - replet name.
Returns:
default request.

getInitRequest

public RepletRequest getInitRequest(String name)
Get the initialization request for a replet. This request is passed to the init() method of the replet and contains initialization parameters.

Parameters:
name - replet name.
Returns:
init request.

setRepletRequest

public void setRepletRequest(String name,
                             RepletRequest req)
Set the replet request (either INIT or CREATE) for the replet.

Parameters:
name - replet name.
req - INIT or CREATE replet request.

getRepletCount

public int getRepletCount()
Get the number of replets registered in the registry.


getDirectFileCount

public int getDirectFileCount()
Get the number of directly file replets.


getPregeneratedReplets

public String[] getPregeneratedReplets(String cycle)
Get the replet name of a pregenerated replet.


getRegistryPath

protected String getRegistryPath()
Get registry path to save.


save

public void save()
          throws Exception
Save the registry to a registry file.

Throws:
Exception

getLastModified

protected long getLastModified()
Get the last modified.


saveTemplateStream

public void saveTemplateStream(String name,
                               InputStream in)
                        throws Exception
Saves a template stream into the registry. The name of the file will be taken from the replet's template property, or generated based on the replet name if the template property is null.

Parameters:
name - the replet name
in - the template input stream
Throws:
Exception

writeFoldersAndProtos

protected void writeFoldersAndProtos(PrintWriter writer)
Write folder and prototypes.


removePortlet

protected void removePortlet(String replet)

removePortlet

protected void removePortlet(String replet,
                             String user)

savePortlet

protected void savePortlet()
                    throws Exception
Save portlet file which is useful to edit dashboard using jetspeed.

Throws:
Exception

savePortlet

protected void savePortlet(String user)
                    throws Exception
Throws:
Exception

Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.