Style Intelligence v12.0

inetsoft.uql.asset
Interface AssetRepository

All Known Implementing Classes:
AbstractAssetEngine, BeanSheet, CompositeSheet, MetaStyleSheet, MetaTabularSheet, ParameterSheet, RepletEngine, ReportSheet, inetsoft.report.internal.StyleCore, StyleSheet, TabularSheet

public interface AssetRepository

AssetRepository manages sheets and their folders, each one of which belongs to a scope namely GLOBAL_SCOPE, REPORT_SCOPE and USER_SCOPE. We can access any one of them using its associated AssetEntry, which contains information including scope, type, user, path and other properties like report id.


Field Summary
static ThreadLocal ASSET_ERRORS
          Thread local.
static int COMPONENT_SCOPE
          Component scope asset.
static int GLOBAL_SCOPE
          Global scope asset.
static ThreadLocal IGNORE_PERM
           
static String LOCAL_QUERY
          Local query.
static int QUERY_SCOPE
          Query scope asset.
static int REPORT_SCOPE
          Report scope asset.
static String REPORT_WORKSHEET
          Local worksheet.
static int REPOSITORY_SCOPE
          Component scope asset.
static int TEMPORARY_SCOPE
          Temporary scope asset.
static int USER_SCOPE
          User scope asset.
 
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.
 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.
 void changeSheet(AssetEntry oentry, AssetEntry nentry, Principal user, boolean force)
          Change one sheet.
 void checkAssetPermission(Principal principal, AssetEntry entry, String permission)
          Check asset permission.
 void checkFolderRemoveable(AssetEntry entry, Principal user)
          Check if folder is removeable.
 boolean checkPermission(Principal principal, String prefix, String resource, String permission)
          Check permission.
 void clearVSBookmark(AssetEntry entry)
          Clear all the viewsheet bookmarks.
 boolean containsEntry(AssetEntry entry)
          Check if contain the specified asset entry.
 void dispose()
          Dispose the asset repository.
 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)
          Create an unique identifier for the entry.
 XQueryRepository getLocalQueryRepository(String rid)
          Get the local query repository.
 AssetRepository getParent()
          Get the parent of the engine.
 ReportEntry[] getReportSheetDependencies(AssetEntry entry, Principal user)
          Get the report sheets depend on a sheet.
 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.
 inetsoft.util.IndexedStorage getStorage(AssetEntry entry)
          Get the indexed storage of an asset entry.
 inetsoft.uql.viewsheet.VSBookmark getVSBookmark(AssetEntry entry, Principal user)
          Get the viewsheet bookmark.
 void removeAssetChangeListener(AssetChangeListener listener)
          Removes an asset change listener from the notification list.
 void removeFolder(AssetEntry entry, Principal user, boolean force)
          Remove one folder.
 void removeSheet(AssetEntry entry, Principal user, boolean force)
          Remove one sheet.
 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 ws, Principal user, boolean force)
          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.
 

Field Detail

QUERY_SCOPE

static final int QUERY_SCOPE
Query scope asset.

See Also:
Constant Field Values

GLOBAL_SCOPE

static final int GLOBAL_SCOPE
Global scope asset.

See Also:
Constant Field Values

REPORT_SCOPE

static final int REPORT_SCOPE
Report scope asset.

See Also:
Constant Field Values

USER_SCOPE

static final int USER_SCOPE
User scope asset.

See Also:
Constant Field Values

TEMPORARY_SCOPE

static final int TEMPORARY_SCOPE
Temporary scope asset.

See Also:
Constant Field Values

COMPONENT_SCOPE

static final int COMPONENT_SCOPE
Component scope asset.

See Also:
Constant Field Values

REPOSITORY_SCOPE

static final int REPOSITORY_SCOPE
Component scope asset.

See Also:
Constant Field Values

ASSET_ERRORS

static final ThreadLocal ASSET_ERRORS
Thread local.


IGNORE_PERM

static final ThreadLocal IGNORE_PERM

LOCAL_QUERY

static final String LOCAL_QUERY
Local query.

See Also:
Constant Field Values

REPORT_WORKSHEET

static final String REPORT_WORKSHEET
Local worksheet.

See Also:
Constant Field Values
Method Detail

setParent

void setParent(AssetRepository engine)
Set the parent of the engine.

Parameters:
engine - the specified parent.

getParent

AssetRepository getParent()
Get the parent of the engine.

Returns:
the parent of the engine.

supportsScope

boolean supportsScope(int scope)
                      throws Exception
Check if supports one scope.

Parameters:
scope - the specified scope.
Returns:
true if supports, false otherwise.
Throws:
Exception

checkPermission

boolean checkPermission(Principal principal,
                        String prefix,
                        String resource,
                        String permission)
Check permission.

Parameters:
principal - the specified user.
prefix - the specified prefix.
resource - the specified resource.
permission - the specified permission.
Returns:
true if passed, false otherwise.

checkAssetPermission

void checkAssetPermission(Principal principal,
                          AssetEntry entry,
                          String permission)
                          throws Exception
Check asset permission.

Parameters:
principal - the specified user.
entry - the specified asset entry.
permission - the specified permission.
Throws:
Exception

getEntries

AssetEntry[] getEntries(AssetEntry entry,
                        Principal user,
                        String permission)
                        throws Exception
Get the sub entries of a folder.

Parameters:
entry - the specified folder entry.
user - the specified user.
permission - the specified access way.
Returns:
the sub entries of the folder.
Throws:
Exception

getEntries

AssetEntry[] getEntries(AssetEntry entry,
                        Principal user,
                        String permission,
                        int selector)
                        throws Exception
Get the sub entries of a folder.

Parameters:
entry - the specified folder entry.
user - the specified user.
permission - the specified access way.
selector - used to select the type of entries to return. OR'ed value of the entry types defined in AssetEntry.
Returns:
the sub entries of the folder.
Throws:
Exception

addFolder

void addFolder(AssetEntry entry,
               Principal user)
               throws Exception
Add one folder.

Parameters:
entry - the specified folder entry.
user - the specified user.
Throws:
Exception

containsEntry

boolean containsEntry(AssetEntry entry)
                      throws Exception
Check if contain the specified asset entry.

Parameters:
entry - the specified asset entry.
Returns:
true if contains, false otherwise.
Throws:
Exception

changeFolder

void changeFolder(AssetEntry oentry,
                  AssetEntry nentry,
                  Principal user,
                  boolean force)
                  throws Exception
Change one folder.

Parameters:
oentry - the specified old folder entry.
nentry - the specified new folder entry.
user - the specified user.
force - true to change folder forcely without checking dependency.
Throws:
Exception

removeFolder

void removeFolder(AssetEntry entry,
                  Principal user,
                  boolean force)
                  throws Exception
Remove one folder.

Parameters:
entry - the specified folder entry.
user - the specified user.
force - true to remove folder forcely without checking.
Throws:
Exception

getSheet

AbstractSheet getSheet(AssetEntry entry,
                       Principal user,
                       boolean permission,
                       AssetContent ctype)
                       throws Exception
Get one sheet.

Parameters:
entry - the specified sheet entry.
user - the specified user.
permission - true to check permission, false otherwise.
ctype - the asset content type.
Returns:
the associated sheet.
Throws:
Exception

setSheet

void setSheet(AssetEntry entry,
              AbstractSheet ws,
              Principal user,
              boolean force)
              throws Exception
Set one sheet.

Parameters:
entry - the specified sheet entry.
user - the specified user.
force - true to set sheet forcely without checking.
Throws:
Exception

changeSheet

void changeSheet(AssetEntry oentry,
                 AssetEntry nentry,
                 Principal user,
                 boolean force)
                 throws Exception
Change one sheet.

Parameters:
oentry - the specified old sheet entry.
nentry - the specified new sheet entry.
user - the specified user.
force - true to change sheet forcely without checking dependency.
Throws:
Exception

removeSheet

void removeSheet(AssetEntry entry,
                 Principal user,
                 boolean force)
                 throws Exception
Remove one sheet.

Parameters:
entry - the specified sheet entry.
user - the specified user.
force - true to remove sheet forcely without checking.
Throws:
Exception

getSheetDependencies

AssetEntry[] getSheetDependencies(AssetEntry entry,
                                  Principal user)
                                  throws Exception
Get the sheets depend on a sheet.

Parameters:
entry - the specified sheet entry.
user - the specified user.
Returns:
the sheet entries depend on the sheet.
Throws:
Exception

getReportSheetDependencies

ReportEntry[] getReportSheetDependencies(AssetEntry entry,
                                         Principal user)
                                         throws Exception
Get the report sheets depend on a sheet.

Parameters:
entry - the specified sheet entry.
user - the specified user.
Returns:
the report sheet entries depend on the sheet.
Throws:
Exception

allowsFolderScopeChange

void allowsFolderScopeChange(AssetEntry entry,
                             int nscope,
                             Principal user)
                             throws Exception
Check if to change a folder scope is allowed.

Parameters:
entry - the specified folder entry.
nscope - the specified new scope to change to.
user - the specified user.
Throws:
Exception

allowsSheetScopeChange

void allowsSheetScopeChange(AssetEntry entry,
                            int nscope,
                            Principal user)
                            throws Exception
Check if to change a sheet scope is allowed.

Parameters:
entry - the specified sheet entry.
nscope - the specified new scope to change to.
user - the specified uder.
Throws:
Exception

checkFolderRemoveable

void checkFolderRemoveable(AssetEntry entry,
                           Principal user)
                           throws Exception
Check if folder is removeable.

Parameters:
entry - the specified folder entry.
user - the specified user.
Throws:
Exception

addAssetChangeListener

void addAssetChangeListener(AssetChangeListener listener)
Adds a listener that is notified when this repository is modified.

Parameters:
listener - the listener to remove.

removeAssetChangeListener

void removeAssetChangeListener(AssetChangeListener listener)
Removes an asset change listener from the notification list.

Parameters:
listener - the listener to remove.

getSession

Object getSession()
                  throws Exception
Get the session object.

Returns:
the session object.
Throws:
Exception

dispose

void dispose()
Dispose the asset repository.


getLocalQueryRepository

XQueryRepository getLocalQueryRepository(String rid)
Get the local query repository.

Parameters:
rid - the specified report id.
Returns:
the local query repository.

renameUser

void renameUser(String oname,
                String nname)
                throws Exception
Rename a user.

Parameters:
oname - the old name of the user.
nname - the new name of the user.
Throws:
Exception

removeUser

void removeUser(String name)
                throws Exception
Remove a user.

Parameters:
name - the name of the user.
Throws:
Exception

getVSBookmark

inetsoft.uql.viewsheet.VSBookmark getVSBookmark(AssetEntry entry,
                                                Principal user)
                                                throws Exception
Get the viewsheet bookmark.

Parameters:
entry - the entry of the specified viewsheet.
user - the specified user.
Returns:
the viewsheet bookmark if any, null not found.
Throws:
Exception

setVSBookmark

void setVSBookmark(AssetEntry entry,
                   inetsoft.uql.viewsheet.VSBookmark bookmark,
                   Principal user)
                   throws Exception
Set the viewsheet bookmark.

Parameters:
entry - the entry of the specified viewsheet.
bookmark - the specified viewsheet bookmark.
user - the specified user.
Throws:
Exception

clearVSBookmark

void clearVSBookmark(AssetEntry entry)
                     throws Exception
Clear all the viewsheet bookmarks.

Parameters:
entry - the entry of the specified viewsheet.
user - the specified user.
Throws:
Exception

getStorage

inetsoft.util.IndexedStorage getStorage(AssetEntry entry)
                                        throws Exception
Get the indexed storage of an asset entry.

Parameters:
entry - the specified asset entry.
Returns:
the indexed storage of the asset entry.
Throws:
Exception

getEntryIdentifier

String getEntryIdentifier(AssetEntry entry)
Create an unique identifier for the entry.


Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.