Business Objects
Quark Platform Documentation
Version 1.7.0_0
Business Objects

org.openquark.cal.services
Class BasicProgramResourcePathRepository

java.lang.Object
  extended by org.openquark.cal.services.BasicProgramResourcePathRepository
All Implemented Interfaces:
org.openquark.cal.machine.ProgramResourceRepository

public class BasicProgramResourcePathRepository
extends Object
implements org.openquark.cal.machine.ProgramResourceRepository

Warning- this class should only be used by the CAL services implementation. It is not part of the external API of the CAL platform.

A repository of program resources in the stand-alone cal workspace.

Author:
Edward Lam

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.openquark.cal.machine.ProgramResourceRepository
org.openquark.cal.machine.ProgramResourceRepository.Provider
 
Constructor Summary
protected BasicProgramResourcePathRepository(ProgramResourcePathMapper pathMapper, File sourceGenerationRoot)
          Constructor for a BasicProgramResourcePathRepository.
 
Method Summary
 void delete(org.openquark.cal.machine.ProgramResourceLocator resourceLocator)
          
 void delete(org.openquark.cal.machine.ProgramResourceLocator[] resourceLocators)
          
 void ensureFolderExists(org.openquark.cal.machine.ProgramResourceLocator.Folder folder)
          
 boolean exists(org.openquark.cal.machine.ProgramResourceLocator resourceLocator)
          
 AsynchronousFileWriter getAsynchronousFileWriter()
          
 InputStream getContents(org.openquark.cal.machine.ProgramResourceLocator.File fileLocator)
          
 String getDebugInfo(org.openquark.cal.machine.ProgramResourceLocator.File fileLocator)
          
 File getFile(org.openquark.cal.machine.ProgramResourceLocator resourceLocator)
          
 String getLocationString()
          
 org.openquark.cal.machine.ProgramResourceLocator[] getMembers(org.openquark.cal.machine.ProgramResourceLocator.Folder folder)
          
 ModuleName[] getModules()
          
static org.openquark.cal.machine.ProgramResourceRepository.Provider getResourceRepositoryProvider(File sourceGenerationRoot)
           
 long getSize(org.openquark.cal.machine.ProgramResourceLocator.File fileLocator)
          
 boolean isEmpty()
          
 long lastModified(org.openquark.cal.machine.ProgramResourceLocator resourceLocator)
          
 void setContents(org.openquark.cal.machine.ProgramResourceLocator.File fileLocator, InputStream source)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicProgramResourcePathRepository

protected BasicProgramResourcePathRepository(ProgramResourcePathMapper pathMapper,
                                             File sourceGenerationRoot)
Constructor for a BasicProgramResourcePathRepository.

Parameters:
pathMapper -
sourceGenerationRoot - the directory which represents the root of the folder structure which containing the program resources. This will be the parent of the module folders.
Method Detail

getResourceRepositoryProvider

public static org.openquark.cal.machine.ProgramResourceRepository.Provider getResourceRepositoryProvider(File sourceGenerationRoot)
Parameters:
sourceGenerationRoot - the root directory with respect to program resource generation.
Returns:
a provider for a program resource finder associated with the workspace.

getContents

public InputStream getContents(org.openquark.cal.machine.ProgramResourceLocator.File fileLocator)
                        throws IOException

Specified by:
getContents in interface org.openquark.cal.machine.ProgramResourceRepository
Throws:
IOException

setContents

public void setContents(org.openquark.cal.machine.ProgramResourceLocator.File fileLocator,
                        InputStream source)
                 throws IOException

Specified by:
setContents in interface org.openquark.cal.machine.ProgramResourceRepository
Throws:
IOException

ensureFolderExists

public void ensureFolderExists(org.openquark.cal.machine.ProgramResourceLocator.Folder folder)
                        throws IOException

Specified by:
ensureFolderExists in interface org.openquark.cal.machine.ProgramResourceRepository
Throws:
IOException

delete

public void delete(org.openquark.cal.machine.ProgramResourceLocator resourceLocator)
            throws IOException

Specified by:
delete in interface org.openquark.cal.machine.ProgramResourceRepository
Throws:
IOException

delete

public void delete(org.openquark.cal.machine.ProgramResourceLocator[] resourceLocators)
            throws IOException

Specified by:
delete in interface org.openquark.cal.machine.ProgramResourceRepository
Throws:
IOException

exists

public boolean exists(org.openquark.cal.machine.ProgramResourceLocator resourceLocator)

Specified by:
exists in interface org.openquark.cal.machine.ProgramResourceRepository

lastModified

public long lastModified(org.openquark.cal.machine.ProgramResourceLocator resourceLocator)

Specified by:
lastModified in interface org.openquark.cal.machine.ProgramResourceRepository

getMembers

public org.openquark.cal.machine.ProgramResourceLocator[] getMembers(org.openquark.cal.machine.ProgramResourceLocator.Folder folder)

Specified by:
getMembers in interface org.openquark.cal.machine.ProgramResourceRepository

getFile

public File getFile(org.openquark.cal.machine.ProgramResourceLocator resourceLocator)

Specified by:
getFile in interface org.openquark.cal.machine.ProgramResourceRepository

isEmpty

public boolean isEmpty()

Specified by:
isEmpty in interface org.openquark.cal.machine.ProgramResourceRepository

getSize

public long getSize(org.openquark.cal.machine.ProgramResourceLocator.File fileLocator)

Specified by:
getSize in interface org.openquark.cal.machine.ProgramResourceRepository

getModules

public ModuleName[] getModules()

Specified by:
getModules in interface org.openquark.cal.machine.ProgramResourceRepository

getLocationString

public String getLocationString()

Specified by:
getLocationString in interface org.openquark.cal.machine.ProgramResourceRepository

getDebugInfo

public String getDebugInfo(org.openquark.cal.machine.ProgramResourceLocator.File fileLocator)

Specified by:
getDebugInfo in interface org.openquark.cal.machine.ProgramResourceRepository

getAsynchronousFileWriter

public AsynchronousFileWriter getAsynchronousFileWriter()

Specified by:
getAsynchronousFileWriter in interface org.openquark.cal.machine.ProgramResourceRepository

Business Objects
Quark Platform Documentation
Version 1.7.0_0
Business Objects

Copyright © 2007 Business Objects. All rights reserved.