|
Style Intelligence v12.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinetsoft.report.LibManager
public class LibManager
This class manages the bean, table style, and script library. It is a singleton class. The library is created inside the designer. Any beans or table styles used in a report are automatically handled by the report engine. The library is only of interest to a program if it needs to manipulate the library programmatically instead of through the designer.
| Field Summary | |
|---|---|
static int |
BEAN_ADDED
Action event ID if bean is added. |
static int |
BEAN_MODIFIED
Action event ID if bean is modified. |
static int |
BEAN_REMOVED
Action event ID if bean is removed. |
inetsoft.util.DataChangeListener |
changeListener
Listener added to be notified of the manager has change in the data space. |
static int |
META_REPORT_ADDED
Action event ID if meta sheet is added. |
static int |
META_REPORT_MODIFIED
Action event ID if meta sheet is modified. |
static int |
META_REPORT_REMOVED
Action event ID if meta sheet is removed. |
static int |
PARAMETER_SHEET_ADDED
Action event ID if parameter sheet is added. |
static int |
PARAMETER_SHEET_MODIFIED
Action event ID if parameter sheet is modified. |
static int |
PARAMETER_SHEET_REMOVED
Action event ID if parameter sheet is removed. |
static int |
SCRIPT_ADDED
Action event ID if script is added. |
static int |
SCRIPT_MODIFIED
Action event ID if script is modified. |
static int |
SCRIPT_RELOADED
Action event ID if script is reloaded. |
static int |
SCRIPT_REMOVED
Action event ID if script is removed. |
static String |
SEPARATOR
Table style separator. |
static int |
STYLE_ADDED
Action event ID if style is added. |
static int |
STYLE_MODIFIED
Action event ID if style is modified. |
static int |
STYLE_REMOVED
Action event ID if style is removed. |
protected long |
ts
|
static String |
USER_DEFINE
The user define style . |
| Fields inherited from interface inetsoft.report.internal.ParameterSheetRepository |
|---|
EMBED_PARAMETER_SHEET, EMBED_SECTION |
| Constructor Summary | |
|---|---|
protected |
LibManager()
Constructor. |
| Method Summary | |
|---|---|
void |
addActionListener(ActionListener listener)
Add a listener to be notified when the library has been changed. |
void |
addRefreshedListener(PropertyChangeListener listener)
Add a refresh listener that will be notified if the datasource registry has changed. |
void |
addTableStyleFolder(String folder)
Add a table style folder. |
void |
addTableStyleFolder(String folder,
boolean rename)
Add a table style folder. |
protected boolean |
checkPermission(String resource,
char access)
Determines if the current user has permission for the specified access to a resource. |
static void |
clear()
Clear cached library manager. |
boolean |
containsFolder(String folder)
Check if contains a folder. |
static void |
copyLibrary(File in,
File out)
Copies a library from one location to another. |
String |
findBeanName(String name)
Find a bean with the same name by ignoring the case. |
String |
findMetaReportName(String name)
Find a meta report with the same name by ignoring the case. |
String |
findParameterSheetName(String name)
Find a parameter sheet with the same name by ignoring the case. |
String |
findScriptName(String name)
Find a function with the same name by ignoring the case. |
protected void |
fireActionEvent(String name,
int actionID)
Fire an action event. |
protected void |
fireEvent(long ots)
Fire event. |
BeanSheet |
getBean(String name)
Get a report bean by its name. |
String |
getBeanComment(String name)
Get comments of a bean. |
Enumeration |
getBeans()
Get all the bean names. |
String[] |
getDependedFile(String identifier)
Get the depended file. |
InputStream |
getFileInputStream(String path)
Get the file input stream from the path. |
protected inetsoft.util.ReportKey |
getKey()
Gets the key with which this manager is configured. |
static LibManager |
getManager()
Get library manager contains bean, script function, table style, parameter sheet, meta template, etc. |
MetaReport |
getMetaReport(String name)
Get a meta report sheet by its name. |
String |
getMetaReportComment(String name)
Get comments of a meta report. |
Enumeration |
getMetaReports()
Get all the meta report names. |
String |
getNextStyleID(String name)
Get next available table style id. |
ParameterSheet |
getParameterSheet(String name)
Get a parameter sheet. |
String |
getParameterSheetComment(String name)
Get comments of a parameter sheet. |
Enumeration |
getParameterSheets()
Get all the parameter sheet names. |
String |
getScript(String name)
Get a script function by its name. |
String |
getScriptComment(String name)
Get comments of a script function. |
Enumeration |
getScripts()
Get all the script function names. |
inetsoft.report.style.XTableStyle |
getTableStyle(String name)
Get a table style by its name. |
String |
getTableStyleComment(String name)
Get comments of a table style. |
String[] |
getTableStyleFolders(String folder)
Get table style folders. |
Enumeration |
getTableStyles()
Get all the table style names. |
inetsoft.report.style.XTableStyle[] |
getTableStyles(String folder)
Get table styles under a folder. |
String |
getUserSignature(String name)
Get a user defined function's signature by its name. |
protected void |
heartbeat()
Do a heartbeat to synchronize data. |
protected void |
init(boolean event)
Initialize this library manager. |
long |
lastModified()
Get last modified timestamp. |
void |
loadLibrary(InputStream input)
Deprecated. use loadLibrary(String) instead |
void |
loadLibrary(InputStream input,
boolean overwrite)
Deprecated. use loadLibrary(String) instead |
void |
loadLibrary(String path)
Load one library (srl) file. |
protected void |
movePermission(String oresource,
String nresource)
Moves a permission from one resource path to another. |
void |
refresh(boolean event)
Refresh lib manager. |
void |
removeActionListener(ActionListener listener)
Remove a listener. |
void |
removeAllElements()
Remove all elements contained in the library manager. |
void |
removeBean(String name)
Remove a bean from the library. |
void |
removeMetaReport(String name)
Remove a meta report from the library. |
void |
removeParameterSheet(String name)
Remove a parameter sheet from the library. |
void |
removeRefreshedListener(PropertyChangeListener listener)
Remove a refresh listener. |
void |
removeScript(String name)
Remove a script function from the library. |
void |
removeTableStyle(String name)
Remove a table style from the library. |
Object |
removeTableStyleFolder(String folder)
Remove a table style folder. |
Object |
removeTableStyleFolder(String folder,
boolean rename)
Remove a table style folder. |
void |
renameBean(String oldName,
String newName)
Rename a bean. |
void |
renameMetaReport(String oldName,
String newName)
Rename a meta report. |
void |
renameParameterSheet(String oldName,
String newName)
Rename a parameter sheet. |
void |
renameScript(String oldName,
String newName)
Rename a script function. |
static void |
restart()
Restart library manager. |
void |
save()
Save the library contents to the library file. |
void |
save(OutputStream output)
Deprecated. use save() instead. |
void |
setBean(String name,
BeanSheet report)
Set a new bean or replace an existing bean. |
void |
setBeanComment(String name,
String comment)
Set comments of a bean. |
void |
setMetaReport(String name,
MetaReport report)
Set a new meta report or replace an existing meta report. |
void |
setMetaReportComment(String name,
String comment)
Set comments of a meta report. |
void |
setParameterSheet(String name,
ParameterSheet report)
Set a new parameter sheet or replace an existing parameter sheet. |
void |
setParameterSheetComment(String name,
String comment)
Set comments of a parameter sheet. |
void |
setScript(String name,
String func)
Set a new script function or replace an existing script function. |
void |
setScriptComment(String name,
String comment)
Set comments of a script function. |
void |
setTableStyle(String name,
inetsoft.report.style.XTableStyle style)
Set a new table style or replace an existing table style. |
void |
setTableStyle(String name,
inetsoft.report.style.XTableStyle style,
boolean checkParent)
Set a new table style or replace an existing table style. |
void |
setTableStyleComment(String name,
String comment)
Set comments of a table style. |
protected void |
tearDown()
Tear down lib manager. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int BEAN_REMOVED
public static final int BEAN_ADDED
public static final int BEAN_MODIFIED
public static final int STYLE_REMOVED
public static final int STYLE_ADDED
public static final int STYLE_MODIFIED
public static final int SCRIPT_REMOVED
public static final int SCRIPT_ADDED
public static final int SCRIPT_MODIFIED
public static final int SCRIPT_RELOADED
public static final int PARAMETER_SHEET_REMOVED
public static final int PARAMETER_SHEET_ADDED
public static final int PARAMETER_SHEET_MODIFIED
public static final int META_REPORT_REMOVED
public static final int META_REPORT_ADDED
public static final int META_REPORT_MODIFIED
public static final String SEPARATOR
public static final String USER_DEFINE
public inetsoft.util.DataChangeListener changeListener
protected long ts
| Constructor Detail |
|---|
protected LibManager()
| Method Detail |
|---|
public static LibManager getManager()
public static void restart()
public static void clear()
protected void init(boolean event)
event - true if should fire event when resource changes.public void removeAllElements()
protected final inetsoft.util.ReportKey getKey()
public long lastModified()
public void refresh(boolean event)
event - true if should fire event when resource changes.protected void tearDown()
protected void heartbeat()
public static void copyLibrary(File in,
File out)
throws Exception
in - the library to read.out - the library to write.
Exception - if the library could not be copied.
public void loadLibrary(String path)
throws Exception
path - the specified file path.
Exception
@Deprecated
public void loadLibrary(InputStream input)
throws IOException
loadLibrary(String) instead
input - the specified input stream.
IOException
@Deprecated
public void loadLibrary(InputStream input,
boolean overwrite)
throws IOException
loadLibrary(String) instead
input - the specified input stream.overwrite - true to overwrite existing entries in this
library.
IOExceptionpublic String getNextStyleID(String name)
public Enumeration getBeans()
public BeanSheet getBean(String name)
name - the specified bean name.
public String findBeanName(String name)
public void setBean(String name,
BeanSheet report)
name - the specified bean name.report - the specified bean.
public void renameBean(String oldName,
String newName)
oldName - old name of the bean.newName - new name for the bean.public void removeBean(String name)
name - the specified bean name.public String getBeanComment(String name)
name - the specified bean name.
public void setBeanComment(String name,
String comment)
name - the specified bean name.comment - the specified comments.public Enumeration getParameterSheets()
public String findParameterSheetName(String name)
public ParameterSheet getParameterSheet(String name)
getParameterSheet in interface inetsoft.report.internal.ParameterSheetRepositoryname - the specified parameter sheet name.
public void setParameterSheet(String name,
ParameterSheet report)
name - the specified parameter sheet name.report - the specified parameter sheet.
public void renameParameterSheet(String oldName,
String newName)
oldName - old name of the parameter sheet.newName - new name for the parameter sheet.public void removeParameterSheet(String name)
name - the specified parameter sheet name.public String getParameterSheetComment(String name)
name - the specified parameter sheet name.
public void setParameterSheetComment(String name,
String comment)
name - the specified parameter sheet name.scomment - the specified commentspublic Enumeration getMetaReports()
public String findMetaReportName(String name)
public MetaReport getMetaReport(String name)
name - the specified meta report name.
public void setMetaReport(String name,
MetaReport report)
name - the specified meta report name.report - the specified meta report.
public void renameMetaReport(String oldName,
String newName)
oldName - old name of the meta report.newName - new name for the meta report.public void removeMetaReport(String name)
name - the specified meta report name.public String getMetaReportComment(String name)
name - the specified meta report name.
public void setMetaReportComment(String name,
String comment)
name - the specified meta report name.comment - the specified meta report comment.public Enumeration getScripts()
public String findScriptName(String name)
public String getScript(String name)
name - the specified script function name.
public void setScript(String name,
String func)
name - the specified script function name.func - the specified script function.
public void renameScript(String oldName,
String newName)
oldName - old name of the script function.newName - new name of the script function.public void removeScript(String name)
name - the specified script function name.public String getScriptComment(String name)
name - the specified script function name.
public void setScriptComment(String name,
String comment)
name - the specified script function name.comment - the specified comments.public String getUserSignature(String name)
name - the specified script function name.
public boolean containsFolder(String folder)
folder - the specified folder name.
public void addTableStyleFolder(String folder)
folder - the specified folder name.
public void addTableStyleFolder(String folder,
boolean rename)
folder - the specified folder name.public Object removeTableStyleFolder(String folder)
folder - the folder name to be removed.
public Object removeTableStyleFolder(String folder,
boolean rename)
folder - the folder name to be removed.
public String[] getTableStyleFolders(String folder)
folder - parent folder.
public inetsoft.report.style.XTableStyle[] getTableStyles(String folder)
folder - parent folder.
public Enumeration getTableStyles()
public inetsoft.report.style.XTableStyle getTableStyle(String name)
name - the specified table style name.
public void setTableStyle(String name,
inetsoft.report.style.XTableStyle style)
name - the specified table style name.style - the specified table style.
public void setTableStyle(String name,
inetsoft.report.style.XTableStyle style,
boolean checkParent)
name - the specified table style name.style - the specified table style.checkParent - true to check parent permission.public void removeTableStyle(String name)
name - the specified table style name.public String getTableStyleComment(String name)
name - the specified table style name.
public void setTableStyleComment(String name,
String comment)
name - the specified table style name.comment - the specified table style comments.
public void save()
throws Exception
Exception
@Deprecated
public void save(OutputStream output)
throws IOException
save() instead.
output - the specified output stream.
IOException - if an I/O error occurs.public void addActionListener(ActionListener listener)
listener - the specified listener to add.public void removeActionListener(ActionListener listener)
listener - the specified listener to removepublic void addRefreshedListener(PropertyChangeListener listener)
listener - the specified refresh listener.public void removeRefreshedListener(PropertyChangeListener listener)
listener - the specified refresh listener.
protected void fireActionEvent(String name,
int actionID)
name - the changed object name.actionID - the event actionID defined in this class.protected void fireEvent(long ots)
ots - the specified last modified timestamp.public InputStream getFileInputStream(String path)
path - the path of a file.public String[] getDependedFile(String identifier)
protected boolean checkPermission(String resource,
char access)
resource - the name of the resource.access - the type of access.
protected void movePermission(String oresource,
String nresource)
oresource - the old resource path.nresource - the new resource path.
|
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 | ||||||||