|
Style Intelligence v12.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinetsoft.sree.RepletRegistry
public class RepletRegistry
RepletRegistry handles registration of replets. It loads the registration file from the location specified in the 'replet.repository.file' property.
| 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 |
|---|
public static final String ADD_REPLET_EVENT
public static final String ADD_FOLDER_EVENT
public static final String RENAME_REPLET_EVENT
public static final String RENAME_FOLDER_EVENT
public static final String REMOVE_REPLET_EVENT
public static final String REMOVE_PROTOTYPE_EVENT
public static final String REMOVE_FOLDER_EVENT
public static final String EDIT_CYCLE_EVENT
public static final String RELOAD_EVENT
public static final String CHANGE_EVENT
protected boolean noMyreports
protected Vector replets
protected Vector prototypes
protected Hashtable folders
protected Hashtable repletmap
protected Hashtable contextmap
protected Hashtable foldercontextmap
protected Hashtable filemap
protected Hashtable filefoldermap
protected Vector listeners
protected Vector vlisteners
protected inetsoft.util.DataChangeListenerManager dmgr
protected long date
protected inetsoft.util.ReportKey key
| Constructor Detail |
|---|
protected RepletRegistry()
throws Exception
Exception
protected RepletRegistry(Object key)
throws Exception
Exception| Method Detail |
|---|
public static RepletRegistry getRegistry()
throws Exception
Exception
public static RepletRegistry getRegistry(String userName)
throws Exception
Exception
public static void removeUser(String name)
throws Exception
name - the name of the specified user.
Exception
public static void renameUser(String oname,
String nname)
throws Exception
oname - the old name of the specified user.nname - the new name of the specified user.
Exceptionpublic static void clear()
public static void clear(String user)
public void addPropertyChangeListener(PropertyChangeListener listener)
public void removePropertyChangeListener(PropertyChangeListener listener)
protected void fireEvent(String src,
String name,
Object oval,
Object nval)
protected void reload()
protected boolean uptodate()
protected void init()
throws Exception
Exception
protected void load(InputStream repository)
throws Exception
Exceptionpublic void registryDefault(String name)
protected boolean isValidRepletNode(Attributes attributes)
public void loadReportFiles()
public InputStream loadTemplateStream(String name)
throws Exception
name - the name of the replet in the repository
Exception
public void register(String name,
String cls,
String alias,
String desc,
String layout)
name - replet name.cls - replet class name (fully qualified).alias - replet alias.desc - replet description.layout - replet HTML layout: default, auto, css2, or table.
public void register(String name,
String cls,
String alias,
String desc,
String layout,
RepletRequest init,
RepletRequest def)
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.
public void register(String name,
String cls,
String alias,
String desc,
String layout,
int priority,
RepletRequest init,
RepletRequest def)
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.
public void register(String name,
String folder,
String cls,
String alias,
String desc,
String layout,
RepletRequest init,
RepletRequest def)
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.
public void register(String name,
String folder,
String cls,
String alias,
String desc,
String layout,
int priority,
RepletRequest init,
RepletRequest def)
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.
protected void register(String name,
String folder,
String cls,
String alias,
String desc,
String layout,
int priority,
RepletRequest init,
RepletRequest def,
boolean transaction)
public String getReportFilePath(String repletName)
repletName - the specified report file's replet name.
public boolean removeReportFile(String repletName)
public boolean deployReportFile(String repletName)
public boolean deployReportFile(String repletName,
String destName)
repletName - the specified report file's replet name.
true if successful, false otherwise.
public void registerPrototype(String name,
String alias,
String description,
String layout,
RepletRequest init,
RepletRequest def,
String template)
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.public boolean isPrototype(String name)
public boolean removePrototype(String name)
public int getPrototypeCount()
public String[] getAllPrototypes()
public void addVetoListener(ActionVetoListener listener)
public void removeVetoListener(ActionVetoListener listener)
protected void fireVetoEvent(String name,
String action)
throws Exception
Exceptionpublic String[] getAllFolders()
public String[] getAllFolders(boolean publicOnly)
publicOnly - true if only include pulic folder.
public boolean removeFolder(String folderName)
folderName - folder.
public boolean addFolder(String folder)
folder - the folder.
public String[] getFolders(String folder)
public String[] getFolders(String folder,
boolean publicOnly)
public String changeFolder(String oldFolderName,
String newFolderName)
oldFolderName - old folder name.newFolderName - new folder name.
public int getFolderCount()
public boolean isReplet(String name)
public boolean isTemplate(String name)
public void removeReplet(String name)
protected void removeReplet(String name,
boolean transaction)
public void removeReplet(String name,
boolean transaction,
boolean removeSrt)
public String[] getAllReplets()
public String[] getAllReplets(boolean visibleOnly)
visibleOnly - true if only include visible replet.public String[] getReplets(String folder)
public void changeReplet(String oname,
String nname)
oname - the old name of the replet.nname - the new name of the replet.protected RepletContext getRepletContext(String name)
protected FolderContext getFolderContext(String name)
public RepletContext getPrototypeRepletContext(String name)
public void setRepletClass(String name,
String cls)
name - replet name.cls - fully qualified replet class.public String getRepletClass(String name)
name - replet name.
public void setRepletAlias(String name,
String alias)
name - replet name.alias - replet alias.public String getRepletAlias(String name)
name - replet name.
public boolean isParamOnly(String name)
name - replet name.
public void setParamOnly(String name,
boolean paramOnly)
name - replet name.paramOnly - true if the replet is a parameters only report.
public void setRepletDescription(String name,
String description)
name - replet name.description - replet descriptions.public String getRepletDescription(String name)
name - replet name.
public void setFolderAlias(String name,
String alias)
name - folder name.alias - folder alias.public String getFolderAlias(String name)
name - folder name.
public void setFolderDescription(String name,
String description)
name - folder name.description - folder descriptions.public String getFolderDescription(String name)
name - folder name.
public void setVisible(String name,
boolean visible)
name - replet name.visible - true if the replet is visible.public boolean isVisible(String name)
name - replet name.
public void setSystem(String name,
boolean system)
name - the name of the replet.system - true if the replet is a system replet.public boolean isSystem(String name)
name - the name of the replet.
true if the replet is a system replet.
public void setPortlet(String name,
boolean portlet)
name - replet name.portlet - true if the replet is portlet.public boolean isPortlet(String name)
name - replet name.
public void setBursting(String name,
boolean burst)
name - replet name.burst - true if the replet is a bursting report.public boolean isBursting(String name)
name - replet name.
public void setPregenerated(String name,
boolean pregenerated)
name - replet name.pregenerated - true if the replet is pregenerated.public boolean isPregenerated(String name)
name - replet name.
public void setPregeneratedCycle(String name,
String ncycle)
name - replet name.ncycle - pregenerated cycle name.
public void setPregeneratedCycle(String name,
String ncycle,
boolean transaction)
public String getPregeneratedCycle(String name)
name - replet name.
public void setExportFormats(String name,
String formats)
public String getExportFormats(String name)
name - replet name.
public void setFile(String name,
boolean df)
name - replet name.df - true if the replet is file.public boolean isFile(String name)
name - replet name.
public boolean isFileFolder(String folder)
folder - the specified folder name.public boolean isFolder(String folder)
public void setLayout(String name,
String layout)
name - replet name.layout - the layout style.public String getLayout(String name)
name - replet name.
public void setTemplate(String name,
String template)
name - replet name.template - template resource name.public String getTemplate(String name)
name - replet name.
public void setPriority(String name,
int priority)
name - replet name.priority - replet priority.public int getPriority(String name)
name - replet name.
public RepletRequest getDefaultRequest(String name)
name - replet name.
public RepletRequest getInitRequest(String name)
name - replet name.
public void setRepletRequest(String name,
RepletRequest req)
name - replet name.req - INIT or CREATE replet request.public int getRepletCount()
public int getDirectFileCount()
public String[] getPregeneratedReplets(String cycle)
protected String getRegistryPath()
public void save()
throws Exception
Exceptionprotected long getLastModified()
public void saveTemplateStream(String name,
InputStream in)
throws Exception
name - the replet namein - the template input stream
Exceptionprotected void writeFoldersAndProtos(PrintWriter writer)
protected void removePortlet(String replet)
protected void removePortlet(String replet,
String user)
protected void savePortlet()
throws Exception
Exception
protected void savePortlet(String user)
throws Exception
Exception
|
Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||