|
Style Intelligence v12.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinetsoft.uql.service.QueryRegistry
public class QueryRegistry
Query registry stores information about all queries. The data is stored in a XML file.
| Field Summary | |
|---|---|
inetsoft.util.DataChangeListener |
changeListener
Listener added to be notified of the registry has changed in the data space. |
static String |
QUERY
|
protected long |
ts
|
| Constructor Summary | |
|---|---|
protected |
QueryRegistry()
Constructor. |
protected |
QueryRegistry(Object key)
Constructor. |
| Method Summary | |
|---|---|
void |
addModifiedListener(PropertyChangeListener listener)
Add a modified listener that will be notified if the query registry has changed when saved. |
void |
addRefreshedListener(PropertyChangeListener listener)
Add a refresh listener that will be notified if the datasource registry has changed on disk. |
protected boolean |
checkPermission(String resource,
char access)
|
static void |
clear()
Clear cached query registry. |
protected void |
fireEvent(long ots)
Fire event. |
protected void |
fireModifiedEvent()
Fire a modified event. |
protected inetsoft.util.ReportKey |
getKey()
Gets the report key with which this instance is configured. |
Enumeration |
getQueries()
Deprecated. |
XQuery |
getQuery(String qname)
Get query object by its name. |
String |
getQueryDatasource(String qname)
Get data source of specified query. |
String |
getQueryFolder(String qname)
Get folder of specified query. |
String[] |
getQueryNames()
Get names of all the queries in this repository. |
String[] |
getQueryNames(String ds,
String folder,
boolean checkFolder)
Get names of query in specified data source and folder. |
String |
getQueryType(String qname)
Get type of specified query. |
static QueryRegistry |
getRegistry()
Get query registry. |
protected void |
heartbeat()
Do a heartbeat to synchronize data. |
protected void |
init(boolean event)
Initialize queries. |
boolean |
isLoaded(String qname)
Check if the query has been created. |
boolean |
isQueryVisible(String qname)
Return if query is visible or not. |
long |
lastModified()
Get last modified timestamp. |
void |
load(InputStream in)
Load query registry fom an input stream. |
void |
load(InputStream in,
boolean overwrite)
Load query registry fom an input stream. |
XQuery |
parseXQuery(Element elem)
Parse an xml element to get a query object. |
void |
refresh(boolean event)
Refresh query registry. |
void |
refresh(boolean event,
boolean force)
Refresh query registry. |
void |
removeAllQueries()
Remove all quries. |
void |
removeModifiedListener(PropertyChangeListener listener)
Remove a modified listener. |
void |
removeQuery(String qname)
Remove a query from the repository. |
void |
removeRefreshedListener(PropertyChangeListener listener)
Remove a refresh listener. |
void |
save()
Save the registry xml representation to registry file. |
void |
save(OutputStream output)
Save the registry xml representation to an output stream. |
void |
setQuery(XQuery dx)
Add or replace a query in the repository. |
void |
setQuery(XQuery dx,
String oname)
Add or replace a query in the repository. |
protected void |
teardown()
Tear down query registry. |
void |
updateQuery(XQuery dx,
String oname)
Update a query. |
void |
updateQuery(XQuery dx,
String oname,
Boolean actionRecord)
Update a query. |
void |
writeXQuery(PrintWriter writer,
XQuery dx)
Write an xquery. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String QUERY
public inetsoft.util.DataChangeListener changeListener
protected long ts
| Constructor Detail |
|---|
protected QueryRegistry()
throws Exception
Exception
protected QueryRegistry(Object key)
throws Exception
Exception| Method Detail |
|---|
public static QueryRegistry getRegistry()
public static void clear()
protected final inetsoft.util.ReportKey getKey()
protected void init(boolean event)
throws Exception
event - true if should fire event when resource changes.
Exceptionpublic void refresh(boolean event)
event - true if should fire event when resource changes.
public void refresh(boolean event,
boolean force)
event - true if should fire event when resource changes.force - true if force registry to be reloaded no matter if
it is up to date.public void removeAllQueries()
public long lastModified()
protected void teardown()
protected void heartbeat()
public void load(InputStream in)
throws Exception
in - the specified input stream.
Exception
public void load(InputStream in,
boolean overwrite)
throws Exception
in - the specified input stream.
Exceptionpublic String[] getQueryNames()
public String[] getQueryNames(String ds,
String folder,
boolean checkFolder)
public String getQueryDatasource(String qname)
public String getQueryFolder(String qname)
public String getQueryType(String qname)
public boolean isQueryVisible(String qname)
public XQuery getQuery(String qname)
qname - the specified query name.
public Enumeration getQueries()
public void setQuery(XQuery dx)
dx - the specified query object.
public void setQuery(XQuery dx,
String oname)
dx - the specified query object.oname - only used in RempteQueryRegistry.public boolean isLoaded(String qname)
public void removeQuery(String qname)
qname - the specified query name.
public void updateQuery(XQuery dx,
String oname)
public void updateQuery(XQuery dx,
String oname,
Boolean actionRecord)
public void save()
throws Exception
Exception
public void save(OutputStream output)
throws Exception
output - the specified output stream.
Exception
public void writeXQuery(PrintWriter writer,
XQuery dx)
throws Exception
writer - the speciefied print writer.dx - the speciefied xquery.
Exceptionpublic XQuery parseXQuery(Element elem)
elem - the specified xml element.
protected void fireEvent(long ots)
ots - the specified last modified timestamp.public void addRefreshedListener(PropertyChangeListener listener)
listener - the specified refresh listener.public void removeRefreshedListener(PropertyChangeListener listener)
listener - the specified refresh listener.protected void fireModifiedEvent()
public void addModifiedListener(PropertyChangeListener listener)
listener - the specified modified listener.public void removeModifiedListener(PropertyChangeListener listener)
listener - the specified modified listener.
protected boolean checkPermission(String resource,
char access)
|
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 | ||||||||