|
Style Intelligence v12.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinetsoft.uql.asset.AbstractAssetEngine
public abstract class AbstractAssetEngine
Abstract asset engine, implements most methods defined in AssetRepository.
| Nested Class Summary | |
|---|---|
protected class |
AbstractAssetEngine.ReportSheetDependencyFinder
Report sheet dependency finder finds report dependencies. |
static class |
AbstractAssetEngine.SheetTransformListener
Sheet transformer listener. |
protected class |
AbstractAssetEngine.StorageChangeListener
|
| Field Summary | |
|---|---|
protected boolean |
admin
|
protected inetsoft.util.Catalog |
catalog
|
static boolean |
editing
|
protected inetsoft.util.IndexedStorage |
istore
|
static ThreadLocal |
LOCAL
|
protected WeakReference |
parent
|
protected int[] |
scopes
|
| Fields inherited from interface inetsoft.uql.asset.AssetRepository |
|---|
ASSET_ERRORS, COMPONENT_SCOPE, GLOBAL_SCOPE, IGNORE_PERM, LOCAL_QUERY, QUERY_SCOPE, REPORT_SCOPE, REPORT_WORKSHEET, REPOSITORY_SCOPE, TEMPORARY_SCOPE, USER_SCOPE |
| Constructor Summary | |
|---|---|
protected |
AbstractAssetEngine()
Constructor. |
|
AbstractAssetEngine(int[] scopes,
inetsoft.util.IndexedStorage istore)
Constructor. |
| Method Summary | |
|---|---|
void |
addAssetChangeListener(AssetChangeListener listener)
Adds a listener that is notified when this repository is modified. |
void |
addFolder(AssetEntry entry,
Principal user)
Add one folder. |
int |
addr()
Get original hash code. |
void |
allowsFolderScopeChange(AssetEntry entry,
int nscope,
Principal user)
Check if to change a folder scope is allowed. |
void |
allowsSheetScopeChange(AssetEntry entry,
int nscope,
Principal user)
Check if to change a sheet scope is allowed. |
void |
changeFolder(AssetEntry oentry,
AssetEntry nentry,
Principal user,
boolean force)
Change one folder. |
protected void |
changeFolder0(AssetEntry oentry,
inetsoft.util.IndexedStorage ostorage,
AssetEntry nentry,
inetsoft.util.IndexedStorage nstorage,
boolean root)
Change one folder internally. |
void |
changeSheet(AssetEntry oentry,
AssetEntry nentry,
Principal user,
boolean force)
Change one sheet. |
protected void |
changeSheet0(AssetEntry oentry,
inetsoft.util.IndexedStorage ostorage,
AssetEntry nentry,
inetsoft.util.IndexedStorage nstorage)
Change one sheet internally. |
void |
checkAssetPermission(Principal principal,
AssetEntry entry,
String permission)
Check asset permission. |
protected abstract boolean |
checkDataSourceFolderPermission(String folder,
Principal user)
Check the datasource folder permission. |
protected abstract boolean |
checkDataSourcePermission(String dname,
Principal user)
Check the datasource permission. |
protected void |
checkDependencyValidity(AssetEntry from,
AssetEntry to)
Check the validity of a dependency from one asset entry to another aset entry. |
void |
checkFolderRemoveable(AssetEntry entry,
Principal user)
Check if folder is removeable. |
boolean |
checkPermission(Principal principal,
String prefix,
String resource,
String permission)
Check permission. |
protected abstract boolean |
checkQueryFolderPermission(String folder,
String source,
Principal user)
Check the query folder permission. |
protected abstract boolean |
checkQueryPermission(String query,
Principal user)
Check the query permission. |
void |
clearCache(AssetEntry entry)
Clear the cache for the entry. |
void |
clearVSBookmark(AssetEntry entry)
Clear all the viewsheet bookmarks. |
protected void |
closeStorages()
Close all the storages. |
boolean |
containsEntry(AssetEntry entry)
Check if contains the specified asset entry. |
protected abstract AbstractAssetEngine.ReportSheetDependencyFinder |
createFinder()
Create finder. |
protected AssetEntry |
createPhysicalEntry(XNode node,
Principal user,
XDataSource xds)
Create a physical asset entry according to an xnode as metadata. |
void |
dispose()
Dispose the asset repository. |
protected void |
finalize()
Finalize the object. |
protected void |
fireEvent(int entryType,
int changeType,
AssetEntry assetEntry,
String oldName)
Notify all registered listeners that an asset entry has been modified. |
protected String |
getAssetPrefix(AssetEntry entry)
Get the asset permission prefix. |
protected File |
getDependencyFile()
Get the dependency file stores dependencies from the report sheets to the worksheets. |
protected String |
getDependencyFileKey()
Get the dependency file stores dependencies from the report sheets to the sheets. |
protected abstract String |
getDependencyFileName()
Get the dependency file stores dependencies from the report sheets to the sheets. |
protected inetsoft.report.gui.reportsheet.DesignView |
getDesignView()
Get runtime design view. |
AssetEntry[] |
getEntries(AssetEntry entry,
Principal user,
String permission)
Get the sub entries of a folder. |
AssetEntry[] |
getEntries(AssetEntry entry,
Principal user,
String permission,
int selector)
Get the sub entries of a folder. |
String |
getEntryIdentifier(AssetEntry entry)
tomzhang bug1318530017384 Create a new identifier for local worksheet to avoid allmap key conflict maybe override by subclass |
protected abstract XTypeNode |
getOutputType(String qname,
XQueryRepository rep,
boolean local,
Principal user)
Get query output type. |
AssetRepository |
getParent()
Get the parent of the engine. |
protected inetsoft.uql.asset.internal.AssetFolder |
getParentFolder(AssetEntry entry,
inetsoft.util.IndexedStorage storage)
Get the parent folder content of an asset(sheet/folder). |
protected AssetEntry[] |
getQueryEntries(AssetEntry entry,
int selector,
Principal user)
Get the sub query entries of a folder. |
protected inetsoft.uql.util.XQuotaManager |
getQuotaManager()
Get the quota manager. |
protected abstract ReportManager |
getReportManager(String user)
Get the report manager. |
ReportEntry[] |
getReportSheetDependencies(AssetEntry entry,
Principal user)
Get the report sheets depend on a sheet. |
inetsoft.util.IndexedStorage |
getReportStorage(AssetEntry entry)
Get report storage. |
Object |
getSession()
Get the session object. |
AbstractSheet |
getSheet(AssetEntry entry,
Principal user,
boolean permission,
AssetContent ctype)
Get one sheet. |
AssetEntry[] |
getSheetDependencies(AssetEntry entry,
Principal user)
Get the sheets depend on a sheet. |
protected inetsoft.util.IndexedStorage |
getStorage(AbstractAssetEngine engine)
Get the indexed storage of an asset engine. |
inetsoft.util.IndexedStorage |
getStorage(AssetEntry entry)
Get the indexed storage of an asset entry. |
protected inetsoft.util.IndexedStorage[] |
getStorages()
Get all the indexed storages require close. |
inetsoft.uql.viewsheet.VSBookmark |
getVSBookmark(AssetEntry entry,
Principal user)
Get the viewsheet bookmark. |
AssetEntry[] |
getWorksheetEntries(AssetEntry entry,
Principal user,
String permission,
int selector)
Get the worksheet entries of a folder. |
protected void |
initFinder()
Initialize finder. |
protected boolean |
isEntryAvailable(AssetEntry entry)
|
void |
removeAssetChangeListener(AssetChangeListener listener)
Removes an asset change listener from the notification list. |
void |
removeFolder(AssetEntry entry,
Principal user,
boolean force)
Remove one folder. |
protected void |
removeFolder0(AssetEntry entry,
inetsoft.util.IndexedStorage storage)
Remove one folder internally. |
void |
removeSheet(AssetEntry entry,
Principal user,
boolean force)
Remove one sheet. |
protected void |
removeSheet0(AssetEntry entry,
inetsoft.util.IndexedStorage storage)
Remove one sheet internally. |
void |
removeUser(String name)
Remove a user. |
void |
renameUser(String oname,
String nname)
Rename a user. |
void |
setParent(AssetRepository engine)
Set the parent of the engine. |
void |
setSheet(AssetEntry entry,
AbstractSheet sheet,
Principal user,
boolean force)
Set one sheet. |
void |
setSheet(AssetEntry entry,
AbstractSheet sheet,
Principal user,
boolean force,
boolean checkDependency)
Set one sheet. |
void |
setVSBookmark(AssetEntry entry,
inetsoft.uql.viewsheet.VSBookmark bookmark,
Principal user)
Set the viewsheet bookmark. |
boolean |
supportsScope(int scope)
Check if supports one scope. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface inetsoft.uql.asset.AssetRepository |
|---|
getLocalQueryRepository |
| Field Detail |
|---|
public static boolean editing
public static ThreadLocal LOCAL
protected int[] scopes
protected inetsoft.util.IndexedStorage istore
protected WeakReference parent
protected inetsoft.util.Catalog catalog
protected boolean admin
| Constructor Detail |
|---|
protected AbstractAssetEngine()
public AbstractAssetEngine(int[] scopes,
inetsoft.util.IndexedStorage istore)
throws Exception
Exception| Method Detail |
|---|
protected void initFinder()
public void setParent(AssetRepository engine)
setParent in interface AssetRepositoryengine - the specified parent.public AssetRepository getParent()
getParent in interface AssetRepository
public boolean supportsScope(int scope)
throws Exception
supportsScope in interface AssetRepositoryscope - the specified scope.
Exception
public AssetEntry[] getEntries(AssetEntry entry,
Principal user,
String permission)
throws Exception
getEntries in interface AssetRepositoryentry - the specified folder entry.user - the specified user.permission - the specified access way.
Exception
public AssetEntry[] getEntries(AssetEntry entry,
Principal user,
String permission,
int selector)
throws Exception
getEntries in interface AssetRepositoryentry - the specified folder entry.user - the specified user.permission - the specified access way.selector - the specified selector.
Exception
public AssetEntry[] getWorksheetEntries(AssetEntry entry,
Principal user,
String permission,
int selector)
throws Exception
entry - the specified folder entry.selector - the specified selector.user - the specified user.
Exception
public Object getSession()
throws Exception
getSession in interface AssetRepositoryException
protected AssetEntry createPhysicalEntry(XNode node,
Principal user,
XDataSource xds)
node - the specified xnode.user - the specified user.xds - the specified jdbc data source.
protected AssetEntry[] getQueryEntries(AssetEntry entry,
int selector,
Principal user)
throws Exception
entry - the specified folder entry.selector - the specified selector.user - the specified user.
Exception
protected abstract XTypeNode getOutputType(String qname,
XQueryRepository rep,
boolean local,
Principal user)
throws Exception
qname - the specified query name.rep - the specified local query repository.local - true if is a local query.user - the specified principal.
Exception
protected abstract boolean checkQueryFolderPermission(String folder,
String source,
Principal user)
folder - the specified folder.source - the specified source.user - the specified user.
protected abstract boolean checkQueryPermission(String query,
Principal user)
query - the specified query.user - the specified user.
protected abstract boolean checkDataSourcePermission(String dname,
Principal user)
dname - the specified datasource.user - the specified user.
protected abstract boolean checkDataSourceFolderPermission(String folder,
Principal user)
folder - the specified datasource folder.user - the specified user.
public void addFolder(AssetEntry entry,
Principal user)
throws Exception
addFolder in interface AssetRepositoryentry - the specified folder entry.user - the specified user.
Exceptionprotected boolean isEntryAvailable(AssetEntry entry)
public boolean containsEntry(AssetEntry entry)
throws Exception
containsEntry in interface AssetRepositoryentry - the specified asset entry.
Exception
public void changeFolder(AssetEntry oentry,
AssetEntry nentry,
Principal user,
boolean force)
throws Exception
changeFolder in interface AssetRepositoryoentry - the specified old folder entry.nentry - the specified new folder entry.user - the specified user.force - true to change folder forcely without
checking dependency.
Exception
protected void changeFolder0(AssetEntry oentry,
inetsoft.util.IndexedStorage ostorage,
AssetEntry nentry,
inetsoft.util.IndexedStorage nstorage,
boolean root)
throws Exception
oentry - the specified old folder entry.nentry - the specified new folder entry.
Exception
public void removeFolder(AssetEntry entry,
Principal user,
boolean force)
throws Exception
removeFolder in interface AssetRepositoryentry - the specified folder entry.user - the specified user.force - true to remove folder forcely without checking.
Exception
protected void removeFolder0(AssetEntry entry,
inetsoft.util.IndexedStorage storage)
throws Exception
entry - the specified folder entry.storage - the specified indexed storage.
Exception
public void checkFolderRemoveable(AssetEntry entry,
Principal user)
throws Exception
checkFolderRemoveable in interface AssetRepositoryentry - the specified folder entry.user - the specified user.
Exceptionpublic String getEntryIdentifier(AssetEntry entry)
getEntryIdentifier in interface AssetRepositoryentry - AssetEntry
public AbstractSheet getSheet(AssetEntry entry,
Principal user,
boolean permission,
AssetContent ctype)
throws Exception
getSheet in interface AssetRepositoryentry - the specified sheet entry.user - the specified user.permission - true to check permission, false
otherwise.ctype - the asset content type.
Exception
public inetsoft.util.IndexedStorage getReportStorage(AssetEntry entry)
throws Exception
Exceptionpublic int addr()
public void setSheet(AssetEntry entry,
AbstractSheet sheet,
Principal user,
boolean force)
throws Exception
AssetRepository
setSheet in interface AssetRepositoryentry - the specified sheet entry.user - the specified user.force - true to set sheet forcely without
checking.
Exception
public void setSheet(AssetEntry entry,
AbstractSheet sheet,
Principal user,
boolean force,
boolean checkDependency)
throws Exception
entry - the specified sheet entry.sheet - the specified sheet.user - the specified user.force - true to set sheet forcely without
checking.
Exception
protected void checkDependencyValidity(AssetEntry from,
AssetEntry to)
throws Exception
from - the specified dependecy asset entry.to - the specified dependent asset entry.
Exception
public void changeSheet(AssetEntry oentry,
AssetEntry nentry,
Principal user,
boolean force)
throws Exception
changeSheet in interface AssetRepositoryoentry - the specified old sheet entry.nentry - the specified new sheet entry.user - the specified user.force - true to change sheet forcely without
checking dependency.
Exception
protected void changeSheet0(AssetEntry oentry,
inetsoft.util.IndexedStorage ostorage,
AssetEntry nentry,
inetsoft.util.IndexedStorage nstorage)
throws Exception
oentry - the specified old sheet entry.nentry - the specified new sheet entry.
Exception
public void removeSheet(AssetEntry entry,
Principal user,
boolean force)
throws Exception
removeSheet in interface AssetRepositoryentry - the specified sheet entry.user - the specified user.force - true to remove sheet forcely without
checking.
Exception
protected void removeSheet0(AssetEntry entry,
inetsoft.util.IndexedStorage storage)
throws Exception
entry - the specified sheet entry.storage - the storage that contains the entry.
Exception
protected inetsoft.uql.asset.internal.AssetFolder getParentFolder(AssetEntry entry,
inetsoft.util.IndexedStorage storage)
throws Exception
entry - the specified asset entry.storage - the specified indexed storage.
Exception
public void checkAssetPermission(Principal principal,
AssetEntry entry,
String permission)
throws Exception
checkAssetPermission in interface AssetRepositoryprincipal - the specified user.entry - the specified asset entry.permission - the specified permission.
Exceptionprotected final String getAssetPrefix(AssetEntry entry)
entry - the specified asset entry.
public boolean checkPermission(Principal principal,
String prefix,
String resource,
String permission)
checkPermission in interface AssetRepositoryprincipal - the specified user.prefix - the specified prefix.resource - the specified resource.permission - the specified permission.
protected void closeStorages()
public inetsoft.util.IndexedStorage getStorage(AssetEntry entry)
throws Exception
getStorage in interface AssetRepositoryentry - the specified asset entry.
Exceptionprotected inetsoft.util.IndexedStorage[] getStorages()
protected inetsoft.uql.util.XQuotaManager getQuotaManager()
protected final inetsoft.util.IndexedStorage getStorage(AbstractAssetEngine engine)
engine - the specified asset engine.
protected abstract ReportManager getReportManager(String user)
protected String getDependencyFileKey()
protected abstract String getDependencyFileName()
protected File getDependencyFile()
public AssetEntry[] getSheetDependencies(AssetEntry entry,
Principal user)
throws Exception
getSheetDependencies in interface AssetRepositoryentry - the specified sheet entry.user - the specified user.
Exception
public ReportEntry[] getReportSheetDependencies(AssetEntry entry,
Principal user)
throws Exception
getReportSheetDependencies in interface AssetRepositoryentry - the specified sheet entry.user - the specified user.
Exception
public void allowsFolderScopeChange(AssetEntry entry,
int nscope,
Principal user)
throws Exception
allowsFolderScopeChange in interface AssetRepositoryentry - the specified folder entry.nscope - the specified new scope to change to.user - the specified user.
Exception
public void allowsSheetScopeChange(AssetEntry entry,
int nscope,
Principal user)
throws Exception
allowsSheetScopeChange in interface AssetRepositoryentry - the specified sheet entry.nscope - the specified new scope to change to.user - the specified user.
Exceptionpublic void dispose()
dispose in interface AssetRepositorypublic void addAssetChangeListener(AssetChangeListener listener)
addAssetChangeListener in interface AssetRepositorylistener - the listener to remove.public void removeAssetChangeListener(AssetChangeListener listener)
removeAssetChangeListener in interface AssetRepositorylistener - the listener to remove.
protected void fireEvent(int entryType,
int changeType,
AssetEntry assetEntry,
String oldName)
entryType - the type of entry to which the change was made.changeType - the type of change that was made to the entry.assetEntry - the modified asset entry.oldName - the old name of the entry, of null if the
entry was not renamed.
protected void finalize()
throws Throwable
finalize in class ObjectThrowable
public void renameUser(String oname,
String nname)
throws Exception
renameUser in interface AssetRepositoryoname - the old name of the user.nname - the new name of the user.
Exception
public void removeUser(String name)
throws Exception
removeUser in interface AssetRepositoryname - the name of the user.
Exception
public inetsoft.uql.viewsheet.VSBookmark getVSBookmark(AssetEntry entry,
Principal user)
throws Exception
getVSBookmark in interface AssetRepositoryentry - the entry of the specified viewsheet.user - the specified user.
Exception
public void clearVSBookmark(AssetEntry entry)
throws Exception
clearVSBookmark in interface AssetRepositoryentry - the entry of the specified viewsheet.
Exception
public void setVSBookmark(AssetEntry entry,
inetsoft.uql.viewsheet.VSBookmark bookmark,
Principal user)
throws Exception
setVSBookmark in interface AssetRepositoryentry - the entry of the specified viewsheet.bookmark - the specified viewsheet bookmark.user - the specified user.
Exceptionprotected abstract AbstractAssetEngine.ReportSheetDependencyFinder createFinder()
public void clearCache(AssetEntry entry)
protected inetsoft.report.gui.reportsheet.DesignView getDesignView()
|
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 | ||||||||