org.jboss.system.server.profileservice
Class VFSScanner

java.lang.Object
  extended by org.jboss.util.JBossObject
      extended by org.jboss.system.server.profileservice.VFSScanner
All Implemented Interfaces:
Cloneable, org.jboss.util.JBossInterface

public abstract class VFSScanner
extends org.jboss.util.JBossObject

A DeploymentScanner build on top of the VFS and ProfileService. This is a first pass to flesh out the APIs/concepts.

Version:
$Revision: 85526 $
Author:
Dimitris Andreadis, Scott.Stark@jboss.org, adrian@jboss.org

Field Summary
 
Fields inherited from class org.jboss.util.JBossObject
hashCode, log, toString
 
Constructor Summary
VFSScanner()
           
 
Method Summary
protected abstract  org.jboss.deployers.vfs.spi.client.VFSDeployment add(org.jboss.profileservice.spi.Profile profile, org.jboss.virtual.VirtualFile file)
          Remove the component
 void addURI(URI uri)
          Add a uri
protected  org.jboss.deployers.vfs.spi.client.VFSDeployment createDeployment(org.jboss.virtual.VirtualFile file)
          Create a deployment
 String getFilter()
          Get the filer
 org.jboss.virtual.VirtualFileFilter getFilterInstance()
          Get the filter instance
 org.jboss.profileservice.spi.ProfileKey getProfileKey()
          Get the profileKey.
 org.jboss.profileservice.spi.ProfileService getProfileService()
          Get the profileService.
 boolean getRecursiveSearch()
          Get the recursive search
 List<URI> getURIList()
          Get the uri list
 boolean hasURI(URI uri)
          Whether it has the uri
protected abstract  void remove(org.jboss.profileservice.spi.Profile profile, String name)
          Remove the component
 void removeURI(URI uri)
          Remove a uri
 void scan()
          Scan
 void setFilter(String classname)
          Set the filter
 void setFilterInstance(org.jboss.virtual.VirtualFileFilter filter)
          Set the filter instance
 void setProfileKey(org.jboss.profileservice.spi.ProfileKey profileKey)
          Set the profileKey.
 void setProfileService(org.jboss.profileservice.spi.ProfileService profileService)
          Set the profileService.
 void setRecursiveSearch(boolean recurse)
          Set whether to do recursive search
 void setURIList(List<URI> list)
          Set the uri list
 void setURIs(String listspec)
          Set the uris
 void start()
          Start the scan
 
Methods inherited from class org.jboss.util.JBossObject
cacheGetHashCode, cacheToString, clone, equals, flushJBossObjectCache, getClassShortName, getHashCode, hashCode, list, notEqual, toShortString, toShortString, toString, toString, toStringImplementation
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VFSScanner

public VFSScanner()
Method Detail

getProfileKey

public org.jboss.profileservice.spi.ProfileKey getProfileKey()
Get the profileKey.

Returns:
the profileKey.

setProfileKey

public void setProfileKey(org.jboss.profileservice.spi.ProfileKey profileKey)
Set the profileKey.

Parameters:
profileKey - the profileKey.

getProfileService

public org.jboss.profileservice.spi.ProfileService getProfileService()
Get the profileService.

Returns:
the profileService.

setProfileService

public void setProfileService(org.jboss.profileservice.spi.ProfileService profileService)
Set the profileService.

Parameters:
profileService - the profileService.

setURIs

public void setURIs(String listspec)
             throws URISyntaxException,
                    IOException
Set the uris

Parameters:
listspec - the uris
Throws:
URISyntaxException
IOException

setURIList

public void setURIList(List<URI> list)
                throws IOException
Set the uri list

Parameters:
list - the list
Throws:
IOException

getURIList

public List<URI> getURIList()
Get the uri list

Returns:
the list

setRecursiveSearch

public void setRecursiveSearch(boolean recurse)
Set whether to do recursive search

Parameters:
recurse - true when recurisve

getRecursiveSearch

public boolean getRecursiveSearch()
Get the recursive search

Returns:
true when recursive

setFilter

public void setFilter(String classname)
               throws ClassNotFoundException,
                      IllegalAccessException,
                      InstantiationException
Set the filter

Parameters:
classname - the filter class name
Throws:
ClassNotFoundException - when the class is not found
IllegalAccessException - when the class's default constructor is not public
InstantiationException - when there is an error constructing the class

getFilter

public String getFilter()
Get the filer

Returns:
the filter

setFilterInstance

public void setFilterInstance(org.jboss.virtual.VirtualFileFilter filter)
Set the filter instance

Parameters:
filter - ther filter

getFilterInstance

public org.jboss.virtual.VirtualFileFilter getFilterInstance()
Get the filter instance

Returns:
the filter

addURI

public void addURI(URI uri)
            throws IOException
Add a uri

Parameters:
uri - the uri
Throws:
IOException - for an error accessing the uri

removeURI

public void removeURI(URI uri)
               throws IOException
Remove a uri

Parameters:
uri - the uri
Throws:
IOException - for an error accessing the uri

hasURI

public boolean hasURI(URI uri)
Whether it has the uri

Parameters:
uri - the uri
Returns:
when the uri is configured

start

public void start()
           throws Exception
Start the scan

Throws:
Exception - for any error

scan

public void scan()
          throws Exception
Scan

Throws:
Exception - for any error

add

protected abstract org.jboss.deployers.vfs.spi.client.VFSDeployment add(org.jboss.profileservice.spi.Profile profile,
                                                                        org.jboss.virtual.VirtualFile file)
                                                                 throws Exception
Remove the component

Parameters:
profile - the profile
file - the virtual file
Returns:
the deployment context or null if not added, e.g. it already exists
Throws:
Exception - for any error

remove

protected abstract void remove(org.jboss.profileservice.spi.Profile profile,
                               String name)
                        throws Exception
Remove the component

Parameters:
profile - the profile
name - the name
Throws:
Exception - for any error

createDeployment

protected org.jboss.deployers.vfs.spi.client.VFSDeployment createDeployment(org.jboss.virtual.VirtualFile file)
Create a deployment

Parameters:
file - the root file
Returns:
the deployment


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.