|
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.DataSourceRegistry
public class DataSourceRegistry
Data source registry stores information on all data sources. The information is stored in a XML file. Applications should not use the data source registry directly. The registry information can be accessed through the XRepository service API.
| Field Summary | |
|---|---|
inetsoft.util.DataChangeListener |
changeListener
Listener added to be notified of the registry has changed in the data space. |
static String |
DATASOURCE
Data source. |
static String |
DATASOURCEFOLDER
Data source folder. |
protected long |
ts
|
| Constructor Summary | |
|---|---|
protected |
DataSourceRegistry()
Constructor. |
protected |
DataSourceRegistry(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. |
boolean |
checkPermission(String resource,
char access)
|
static void |
clear()
Clear cached data source registry. |
void |
clearCache()
Clear source cache. |
boolean |
containDatasource(String dsname)
Check if the specified data source exists in this repository. |
boolean |
containDataSourceFolder(String name)
Check if the specified data source folder exists in this repository. |
boolean |
containObject(inetsoft.util.xml.XMLStorage.Filter[] filters)
|
protected void |
fireEvent(long ots)
Fire event. |
protected void |
fireModifiedEvent()
Fire a modified event. |
String[] |
getAttributes(inetsoft.util.xml.XMLStorage.Filter[] filters,
String attribute)
|
XDataModel |
getDataModel(String datasource)
Get data model object of a data source. |
XDataSource |
getDataSource(String dsname)
Get data source object by its name. |
DataSourceFolder |
getDataSourceFolder(String name)
Get data source folder object by its name. |
String[] |
getDataSourceFolderFullNames()
Get all data source folder names in repository. |
String[] |
getDataSourceFolderNames()
Get all data source folder names in repository. |
String[] |
getDataSourceFullNames()
Get full names of all the data sources in this repository. |
String[] |
getDataSourceNames()
Get simple names of all the data sources in this repository. |
XDomain |
getDomain(String datasource)
Get domain object of a data source. |
String[] |
getExtendedLogicalModelNames(String ds,
String base)
Get names of extended logical model. |
String[] |
getExtendedPartitionNames(String ds,
String base)
Get names of extended partition. |
protected inetsoft.util.ReportKey |
getKey()
Gets the report key with which this instance is configured. |
Object |
getObject(inetsoft.util.xml.XMLStorage.Filter[] filters)
|
static DataSourceRegistry |
getRegistry()
Get data source registry. |
List |
getSubDataSourceNames(String path)
Get the children data source from the specified data source folder path. |
List |
getSubfolderNames(String path)
Get the children data source folder from the specified data source folder path. |
protected void |
heartbeat()
Do a heartbeat to synchronize data. |
protected void |
init(boolean event)
Initialize data sources. |
boolean |
isLoaded(inetsoft.util.xml.XMLStorage.Filter[] filters)
|
long |
lastModified()
Get last modified timestamp. |
void |
load(InputStream in)
Load a registry, and will not check if datasources are duplicated. |
void |
load(InputStream in,
boolean overwrite)
Load a registry, and will check if datasources are duplicated. |
DataSourceFolder |
parseDataSourceFolder(Element elem)
Parse data source folder. |
void |
parseDomain(Element rnode)
Parse Domain. |
void |
parseXDataSource(Element rnode)
Parse XDataSource. |
XDataSource |
parseXDataSource2(Element elem,
boolean check)
Parse XDataSource. |
void |
refresh(boolean event)
Refresh data source registry. |
void |
refresh(boolean event,
boolean force)
Refresh data source registry. |
void |
removeAllDataSources()
Remove all data sources. |
protected void |
removeDataModel(String datasource)
Remove a data model from the repository. |
void |
removeDataSource(String dxname)
Remove a data source from the repository. |
void |
removeDataSourceFolder(String name)
Remove a data source folder and its children from the repository. |
void |
removeDomain(String datasource)
Remove a domain object from the repository. |
void |
removeModifiedListener(PropertyChangeListener listener)
Remove a modified listener. |
void |
removeObjects(inetsoft.util.xml.XMLStorage.Filter[] filters)
|
void |
removeRefreshedListener(PropertyChangeListener listener)
Remove a refresh listener. |
void |
renameDatasource(String oname,
String nname)
Data source renamed, sync data model and domain. |
void |
renameDataSourceFolder(String oname,
String nname)
Data source folder renamed, sync its subfolders and sub datasources. |
void |
save()
Save the registry xml representation to registry file. |
void |
save(OutputStream output)
Save the registry information to an output stream. |
protected void |
save(OutputStream output,
boolean sync)
Save the registry information to an output stream. |
void |
setDataModel(XDataModel dx)
Add a data model object to the repository. |
void |
setDataSource(XDataSource dx)
Add or replace a data source in the repository. |
void |
setDataSource(XDataSource dx,
String oname,
Boolean actionRecord)
Add or replace a data source in the repository. |
void |
setDataSourceFolder(DataSourceFolder folder)
Add or replace a data source folder. |
void |
setDomain(XDomain dx)
Add a domain object to the repository. |
void |
setObject(inetsoft.util.xml.XMLStorage.Filter[] filters,
Object obj)
|
protected void |
teardown()
Tear down query registry. |
void |
updateDataSource(String dxname,
Element elem)
Update a data source. |
void |
updateObject(inetsoft.util.xml.XMLStorage.Filter[] filters,
Object obj,
String[] attributes)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static String DATASOURCE
public static String DATASOURCEFOLDER
public inetsoft.util.DataChangeListener changeListener
protected long ts
| Constructor Detail |
|---|
protected DataSourceRegistry()
throws Exception
Exception
protected DataSourceRegistry(Object key)
throws Exception
Exception| Method Detail |
|---|
public static DataSourceRegistry 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 removeAllDataSources()
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.
Exception
public void parseDomain(Element rnode)
throws Exception
Exception
public void parseXDataSource(Element rnode)
throws Exception
Exception
public XDataSource parseXDataSource2(Element elem,
boolean check)
throws Exception
Exceptionpublic DataSourceFolder parseDataSourceFolder(Element elem)
public boolean containDatasource(String dsname)
public boolean containDataSourceFolder(String name)
public String[] getDataSourceNames()
public String[] getDataSourceFullNames()
public String[] getDataSourceFolderNames()
public String[] getDataSourceFolderFullNames()
public XDataSource getDataSource(String dsname)
dsname - the specified data source.
public DataSourceFolder getDataSourceFolder(String name)
name - the specified data source folder.
public void setDataSource(XDataSource dx)
dx - the specified data source.
public void setDataSource(XDataSource dx,
String oname,
Boolean actionRecord)
dx - the specified data source.oname - only used in RempteDataSourceRegistry.actionRecord - only used in RemoteDataSourceRegistry.public void setDataSourceFolder(DataSourceFolder folder)
folder - the specified data source folder.public void removeDataSource(String dxname)
dxname - the specified data source name.
public void updateDataSource(String dxname,
Element elem)
throws Exception
dxname - the specified data source name.elem - the element with which the datasource will be updated.
Exceptionpublic void removeDataSourceFolder(String name)
name - the specified data source folder name.public XDomain getDomain(String datasource)
datasource - the specified data source.
public void setDomain(XDomain dx)
dx - the specified domain object to add.
public void renameDatasource(String oname,
String nname)
public void renameDataSourceFolder(String oname,
String nname)
public List getSubfolderNames(String path)
path - the specified data source folder name.
public List getSubDataSourceNames(String path)
path - the specified data source folder name.
public void removeDomain(String datasource)
datasource - the specified data source name.public XDataModel getDataModel(String datasource)
datasource - the specified data source name.
public void setDataModel(XDataModel dx)
dx - the specified data model object.protected void removeDataModel(String datasource)
datasource - the specified data source name.
public String[] getExtendedLogicalModelNames(String ds,
String base)
ds - the name of data source.base - the name of base logical model.
public String[] getExtendedPartitionNames(String ds,
String base)
ds - the name of data source.base - the name of base partition
public void save()
throws Exception
Exception
public void save(OutputStream output)
throws Exception
output - the specified output stream.
Exception
protected void save(OutputStream output,
boolean sync)
throws Exception
output - the specified output stream.
Exceptionprotected 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.public boolean isLoaded(inetsoft.util.xml.XMLStorage.Filter[] filters)
public boolean containObject(inetsoft.util.xml.XMLStorage.Filter[] filters)
public void setObject(inetsoft.util.xml.XMLStorage.Filter[] filters,
Object obj)
public void updateObject(inetsoft.util.xml.XMLStorage.Filter[] filters,
Object obj,
String[] attributes)
public Object getObject(inetsoft.util.xml.XMLStorage.Filter[] filters)
public void removeObjects(inetsoft.util.xml.XMLStorage.Filter[] filters)
public String[] getAttributes(inetsoft.util.xml.XMLStorage.Filter[] filters,
String attribute)
public boolean checkPermission(String resource,
char access)
public void clearCache()
|
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 | ||||||||