jet.server.api.admin.cfg
Interface ConfigurationCache


public interface ConfigurationCache

This interface define methods to manage cache configuration of server.


Method Summary
 void appendImage(java.lang.String catFile, java.lang.String imgFile, java.lang.String user)
          append an image to cache,
 long getAnImageSize(java.lang.String catFile, java.lang.String imgFile, java.lang.String user)
          get an image size in memory.
 java.util.Vector getCachedCatalogs()
          Return the filenames of catelog need to cache.
 java.util.Vector getCachedImages()
          Return the filenames of image need to cache.
 java.util.Vector getCachedReports()
          Return the filenames of report need to cache.
 java.util.Vector getCachedReportsWithStyles()
          Return the filenames and styles of report need to cache.
 boolean getDisplayImageDetail()
          Return whether display cached images detail.
 boolean getEnableCacheCatelog()
          Return if cache catelog.
 boolean getEnableCacheImage()
          Return if cache image.
 boolean getEnableCacheReport()
          Return if cache report.
 int getEngineSortBufferSize()
          get the size of engine sort buffer from configuration properties
 java.lang.String getImageBelongedCatalog(java.lang.String fullImagePath)
           
 int getMaxCacheCatalogSize()
          Return the max number of catelogs to be cached.
 int getMaxCacheImageSize()
          Return the max number of images to be cached.
 int getMaxCacheReportSize()
          Return max number of reports to be cached.
 int getSecurityGroupCacheSize()
          Get the security group cache's size
 int getSecurityProectionCacheSize()
          Get the security protection cache's size
 int getSecurityRoleCacheSize()
          Get the security role cache's size
 int getSecurityUserCacheSize()
          Get the security user cache's size
 long getUsedImageCacheSize()
          get used image cache size.
 boolean isCacheAllImages()
          is cache all images
 boolean isLockedImage(java.lang.String catFile, java.lang.String imgFile, java.lang.String user)
          is image locked
 void loadProperties()
          set the properties of server
 boolean lockCachedImage(java.lang.String catFile, java.lang.String imgFile, java.lang.String user)
          lock a cached image.
 void removeAllImages()
          remove all image
 void removeImage(java.lang.String catFile, java.lang.String imgFile, java.lang.String user)
          remove an image
 void saveProperties()
          Save the modifid setting to config file (server.properties).
 void setCacheAllImages(boolean isCacheAllImages)
          set is cache all Images
 boolean setCachedCatalogs(java.lang.String user, java.util.Vector cachedCatalogs)
          Set the filenames of catelog need to cache.if set success return true;
 boolean setCachedCatalogs(java.util.Vector cachedCatalogs)
          Set the filenames of catelog need to cache.if set success return true;
 boolean setCachedReports(java.util.Vector cachedReports)
          Set the filenames of report need to cache.if set success return true;
 boolean setCachedReportsWithStyles(java.lang.String user, java.util.Vector cachedReportsWithStyles)
          Set the filenames and styles of report need to cache.if set success return true;
 boolean setCachedReportsWithStyles(java.util.Vector cachedReportsWithStyles)
          Set the filenames and styles of report need to cache.if set success return true;
 void setDisplayImageDetail(boolean isDisplay)
          Set whether display cached images detail.
 void setEnableCacheCatelog(boolean isEnableCacheCatelog)
          Set if cache catelog.
 void setEnableCacheImage(boolean isEnableCacheImage)
          Set if cache image.
 void setEnableCacheReport(boolean isEnableCacheReport)
          Set if cache report.
 void setEngineSortBufferSize(int size)
          set the size of engine sort buffer.
 void setMaxCacheCatalogSize(int maxCacheCatalog)
          Set the max number of catelogs to be cached.
 void setMaxCacheImageSize(int maxCacheImage)
          Set the max number of images to be cached.
 void setMaxCacheReportSize(int maxCacheReport)
          Set max number of reports to be cached.
 void setSecurityGroupCacheSize(int size)
          Set the security group cache's size If set cache's size to zero or negative, it means turn off the security group cache
 void setSecurityProtectionCacheSize(int size)
          Set the security protection cache's size If set cache's size to zero or negative, it means turn off the security protection cache
 void setSecurityRoleCacheSize(int size)
          Set the security role cache's size If set cache's size to zero or negative, it means turn off the security role cache
 void setSecurityUserCacheSize(int size)
          Set the security user cache's size If set cache's size to zero or negative, it means turn off the security user cache
 void unloadCatalogs(java.lang.String user, java.util.Vector catalogNames)
          Unload the filenames of catelog form cache.
 void unloadCatalogs(java.util.Vector catalogNames)
          Unload the filenames of catelog form cache.
 void unloadReports(java.util.Vector reportNames)
          Unload the filenames of report need to cache.
 void unloadReportsWithStyles(java.lang.String user, java.util.Vector reportNamesWithStyles)
          Unload the filenames and styles of report need to cache.
 void unloadReportsWithStyles(java.util.Vector reportNamesWithStyles)
          Unload the filenames and styles of report need to cache.
 boolean unlockCachedImage(java.lang.String catFile, java.lang.String imgFile, java.lang.String user)
          unlock a cached image.
 

Method Detail

setEnableCacheCatelog

void setEnableCacheCatelog(boolean isEnableCacheCatelog)
Set if cache catelog.

Parameters:
isEnableCacheCatelog - if cache catelog.

getEnableCacheCatelog

boolean getEnableCacheCatelog()
Return if cache catelog.

Returns:
if cache catelog.

setMaxCacheCatalogSize

void setMaxCacheCatalogSize(int maxCacheCatalog)
Set the max number of catelogs to be cached.

Parameters:
maxCacheCatalog - the max number of catelogs to be cached.

getMaxCacheCatalogSize

int getMaxCacheCatalogSize()
Return the max number of catelogs to be cached.

Returns:
the max number of catelogs to be cached.

setEnableCacheImage

void setEnableCacheImage(boolean isEnableCacheImage)
Set if cache image.

Parameters:
isEnableCacheImage - if cache image.

setDisplayImageDetail

void setDisplayImageDetail(boolean isDisplay)
Set whether display cached images detail.

Parameters:
isDisplay - whether display cached images detail.

getEnableCacheImage

boolean getEnableCacheImage()
Return if cache image.

Returns:
if cache image.

getDisplayImageDetail

boolean getDisplayImageDetail()
Return whether display cached images detail.

Returns:
whether display cached images detail.

setMaxCacheImageSize

void setMaxCacheImageSize(int maxCacheImage)
Set the max number of images to be cached.

Parameters:
maxCacheImage - the max number of images to be cached.

getMaxCacheImageSize

int getMaxCacheImageSize()
Return the max number of images to be cached.

Returns:
the max number of images to be cached.

setCachedCatalogs

boolean setCachedCatalogs(java.util.Vector cachedCatalogs)
Set the filenames of catelog need to cache.if set success return true;

Parameters:
cachedCatalogs - the the filenames of catelog need to cache.

setCachedCatalogs

boolean setCachedCatalogs(java.lang.String user,
                          java.util.Vector cachedCatalogs)
Set the filenames of catelog need to cache.if set success return true;

Parameters:
cachedCatalogs - the the filenames of catelog need to cache.

getCachedImages

java.util.Vector getCachedImages()
Return the filenames of image need to cache.

Returns:
the filenames of image need to cache.
Throws:
java.rmi.RemoteException - will be thrown if error occurs.

appendImage

void appendImage(java.lang.String catFile,
                 java.lang.String imgFile,
                 java.lang.String user)
append an image to cache,

Parameters:
catFile - : catalog file's full path name
imgFileName - : the filename of image to be appended
user - : the user ID.

removeImage

void removeImage(java.lang.String catFile,
                 java.lang.String imgFile,
                 java.lang.String user)
remove an image

Parameters:
catFile - : catalog file's full path name
imgFile - : file name of image to be removed
user - : the user ID.

removeAllImages

void removeAllImages()
remove all image


lockCachedImage

boolean lockCachedImage(java.lang.String catFile,
                        java.lang.String imgFile,
                        java.lang.String user)
lock a cached image.

Parameters:
catFile - : full path name of catalog
imgFileName - : file name of image
user - : the user ID.
Returns:
true if lock success, false if the image has locked or lock failed

unlockCachedImage

boolean unlockCachedImage(java.lang.String catFile,
                          java.lang.String imgFile,
                          java.lang.String user)
unlock a cached image.

Parameters:
catFile - : full path name of catalog
imgFileName - : file name of image
user - : the user ID.
Returns:
true if lock success, false if the image has locked or lock failed

getImageBelongedCatalog

java.lang.String getImageBelongedCatalog(java.lang.String fullImagePath)

isLockedImage

boolean isLockedImage(java.lang.String catFile,
                      java.lang.String imgFile,
                      java.lang.String user)
is image locked

Parameters:
catFile - : full path name of catalog file
imgFileName - : the image file name.
user - : the user ID.
Returns:
true if locked, false if 1) not locked, 2) not in cache, 3) not a image file

isCacheAllImages

boolean isCacheAllImages()
is cache all images

Returns:
true if cache all images, false if not.

setCacheAllImages

void setCacheAllImages(boolean isCacheAllImages)
set is cache all Images


getUsedImageCacheSize

long getUsedImageCacheSize()
get used image cache size.

Returns:

getAnImageSize

long getAnImageSize(java.lang.String catFile,
                    java.lang.String imgFile,
                    java.lang.String user)
get an image size in memory.

Parameters:
catFile - : full path name of catalog file, such as /SampleReports/Sample.cat
imgFileName - : the image file name.
user - : the user ID.
Returns:
image size in memory.

getCachedCatalogs

java.util.Vector getCachedCatalogs()
Return the filenames of catelog need to cache.

Returns:
the filenames of catelog need to cache.

setEnableCacheReport

void setEnableCacheReport(boolean isEnableCacheReport)
Set if cache report.

Parameters:
isEnableCacheReport - if cache report.

getEnableCacheReport

boolean getEnableCacheReport()
Return if cache report.

Returns:
if cache report.

setMaxCacheReportSize

void setMaxCacheReportSize(int maxCacheReport)
Set max number of reports to be cached.

Parameters:
maxCacheReport - max number of reports to be cached.

getMaxCacheReportSize

int getMaxCacheReportSize()
Return max number of reports to be cached.

Returns:
max number of reports to be cached.

setCachedReports

boolean setCachedReports(java.util.Vector cachedReports)
Set the filenames of report need to cache.if set success return true;

Parameters:
cachedReports - the filenames of report need to cache.

setCachedReportsWithStyles

boolean setCachedReportsWithStyles(java.util.Vector cachedReportsWithStyles)
Set the filenames and styles of report need to cache.if set success return true;

Parameters:
cachedReportsWithStyles - the filenames and styles of report need to cache.

setCachedReportsWithStyles

boolean setCachedReportsWithStyles(java.lang.String user,
                                   java.util.Vector cachedReportsWithStyles)
Set the filenames and styles of report need to cache.if set success return true;

Parameters:
cachedReportsWithStyles - the filenames and styles of report need to cache.

getCachedReports

java.util.Vector getCachedReports()
Return the filenames of report need to cache.

Returns:
the filenames of report need to cache.

getCachedReportsWithStyles

java.util.Vector getCachedReportsWithStyles()
Return the filenames and styles of report need to cache.

Returns:
the filenames and styles of report need to cache.

unloadCatalogs

void unloadCatalogs(java.util.Vector catalogNames)
Unload the filenames of catelog form cache.

Parameters:
catalogNames - the Vector which is filenames of catelog need to unload.

unloadCatalogs

void unloadCatalogs(java.lang.String user,
                    java.util.Vector catalogNames)
Unload the filenames of catelog form cache.

Parameters:
catalogNames - the Vector which is filenames of catelog need to unload.

unloadReports

void unloadReports(java.util.Vector reportNames)
Unload the filenames of report need to cache.

Parameters:
reportNames - the Vector which is filenames of report need to unload.

unloadReportsWithStyles

void unloadReportsWithStyles(java.util.Vector reportNamesWithStyles)
Unload the filenames and styles of report need to cache.

Parameters:
reportNamesWithStyles - the Vector which is filenames and styles of report need to unload.

unloadReportsWithStyles

void unloadReportsWithStyles(java.lang.String user,
                             java.util.Vector reportNamesWithStyles)
Unload the filenames and styles of report need to cache.

Parameters:
reportNamesWithStyles - the Vector which is filenames and styles of report need to unload.

setSecurityUserCacheSize

void setSecurityUserCacheSize(int size)
Set the security user cache's size If set cache's size to zero or negative, it means turn off the security user cache

Parameters:
size -

getSecurityUserCacheSize

int getSecurityUserCacheSize()
Get the security user cache's size

Returns:
the security user cache's size

setSecurityRoleCacheSize

void setSecurityRoleCacheSize(int size)
Set the security role cache's size If set cache's size to zero or negative, it means turn off the security role cache

Parameters:
size -

getSecurityRoleCacheSize

int getSecurityRoleCacheSize()
Get the security role cache's size

Returns:
the security role cache's size

setSecurityGroupCacheSize

void setSecurityGroupCacheSize(int size)
Set the security group cache's size If set cache's size to zero or negative, it means turn off the security group cache

Parameters:
size -

getSecurityGroupCacheSize

int getSecurityGroupCacheSize()
Get the security group cache's size

Returns:
the security group cache's size

setSecurityProtectionCacheSize

void setSecurityProtectionCacheSize(int size)
Set the security protection cache's size If set cache's size to zero or negative, it means turn off the security protection cache

Parameters:
size -

getSecurityProectionCacheSize

int getSecurityProectionCacheSize()
Get the security protection cache's size

Returns:
the security protection cache's size

loadProperties

void loadProperties()
set the properties of server


saveProperties

void saveProperties()
Save the modifid setting to config file (server.properties).


getEngineSortBufferSize

int getEngineSortBufferSize()
get the size of engine sort buffer from configuration properties


setEngineSortBufferSize

void setEngineSortBufferSize(int size)
set the size of engine sort buffer.