org.glassfish.virtualization.spi
Interface TemplateRepository


@Contract
public interface TemplateRepository

Repository for virtualization templates

Author:
Jerome Dochez

Method Summary
 Collection<TemplateInstance> all()
          Returns all the templates registered in the repository.
 TemplateInstance byName(String name)
          Lookup a template instance by its name
 boolean delete(Template config)
          Deletes a template from the repository
 Collection<TemplateInstance> get(SearchCriteria criteria)
          Search the repository for all templates satisfying the passed SearchCriteria.
 boolean installs(Template config, Collection<File> files)
          Installs a template in the repository
 

Method Detail

installs

boolean installs(Template config,
                 Collection<File> files)
Installs a template in the repository

Parameters:
config - the template configuration as obtained from the user.
Returns:
true if installation was successful, false otherwise

delete

boolean delete(Template config)
Deletes a template from the repository

Parameters:
config - the template configuration
Returns:
true if the template was properly un-installed

get

Collection<TemplateInstance> get(SearchCriteria criteria)
Search the repository for all templates satisfying the passed SearchCriteria.

Parameters:
criteria - the search criteria for the requested templates
Returns:
list of templates satisfying the search criteria.

all

Collection<TemplateInstance> all()
Returns all the templates registered in the repository.

Returns:
the repository content.

byName

TemplateInstance byName(String name)
Lookup a template instance by its name

Parameters:
name - the template name
Returns:
the TemplateInstance if found otherwise null


Copyright © 2012. All Rights Reserved.