Business Objects
Quark Platform Documentation
Version 1.7.0_0
Business Objects

org.openquark.cal.services
Class AbstractResourcePathStore

java.lang.Object
  extended by org.openquark.cal.services.AbstractResourcePathStore
All Implemented Interfaces:
ResourcePathStore, ResourceStore
Direct Known Subclasses:
ResourceFileStore, ResourceJarStore, ResourceNullaryStore

public abstract class AbstractResourcePathStore
extends Object
implements ResourcePathStore

This class provides a basic implementation of some of the methods in the ResourcePathStore interfaces.

Author:
Edward Lam

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.openquark.cal.services.ResourceStore
ResourceStore.Module
 
Constructor Summary
AbstractResourcePathStore(String resourceType, ResourcePathMapper pathMapper)
          Constructor for an AbstractResourcePathStore.
 
Method Summary
 String getFileExtension()
           
 ResourcePathMapper getPathMapper()
           
 ResourcePath.FilePath getResourcePath(ResourceName resourceName)
          Get the path to the resource representing a given feature in this store.
 String getResourceType()
           
protected  boolean transferResourceToAnotherStore(ResourceName oldResourceName, ResourceName newResourceName, ResourceStore newResourceStore, Status status)
          Transfer a resource from this store to another store.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openquark.cal.services.ResourcePathStore
getFilteredFolderResourceNames, getFolderResourceNames
 
Methods inherited from interface org.openquark.cal.services.ResourceStore
getDebugInfo, getInputStream, getOutputStream, getResourceIterator, getTimeStamp, hasFeature, isRemovable, isWriteable, isWriteable, removeAllResources, removeResource, renameResource
 

Constructor Detail

AbstractResourcePathStore

public AbstractResourcePathStore(String resourceType,
                                 ResourcePathMapper pathMapper)
Constructor for an AbstractResourcePathStore.

Parameters:
resourceType - the resource type for the associated resource.
pathMapper - the path mapper for this store.
Method Detail

getResourcePath

public ResourcePath.FilePath getResourcePath(ResourceName resourceName)
Get the path to the resource representing a given feature in this store.

Specified by:
getResourcePath in interface ResourcePathStore
Parameters:
resourceName - the name of the resource.
Returns:
the path under which the resource corresponding to the feature will be stored, or null if the file can not correspond to a resource in the store.

getPathMapper

public ResourcePathMapper getPathMapper()
Returns:
the path mapper

getResourceType

public String getResourceType()
Specified by:
getResourceType in interface ResourceStore
Returns:
the type of the managed resource.

getFileExtension

public String getFileExtension()
Returns:
the file extension associated with the managed resource.

transferResourceToAnotherStore

protected boolean transferResourceToAnotherStore(ResourceName oldResourceName,
                                                 ResourceName newResourceName,
                                                 ResourceStore newResourceStore,
                                                 Status status)
Transfer a resource from this store to another store.

Parameters:
oldResourceName - the name of the resource in this store to be moved to the destination store.
newResourceName - the name of the moved resource in the destination store.
newResourceStore - the destination store.
status - the status tracking object.
Returns:
true if the transfer succeeds, false otherwise.

Business Objects
Quark Platform Documentation
Version 1.7.0_0
Business Objects

Copyright © 2007 Business Objects. All rights reserved.