Forge - Parent 1.4.2-SNAPSHOT

org.jboss.forge.scaffoldx.facets
Interface ScaffoldTemplateFacet

All Superinterfaces:
Facet
All Known Implementing Classes:
MavenScaffoldTemplateFacet

public interface ScaffoldTemplateFacet
extends Facet


Method Summary
 FileResource<?> createResource(char[] data, String provider, String relativeFilename)
          At the given path/filename relative to the scaffold provider specific directory under the project templates directory: #getTemplateDirectory() - create a file containing the given bytes.
 FileResource<?> createResource(InputStream data, String provider, String relativeFilename)
          At the given path/filename relative to the scaffold provider specific directory under the project templates directory: #getTemplateDirectory() - create a file containing the given bytes.
 FileResource<?> createResource(String data, String provider, String relativeFilename)
          At the given path/filename relative to the scaffold provider specific directory under the project templates directory: #getTemplateDirectory() - create a file containing the given bytes.
 FileResource<?> getResource(String provider, String relativePath)
          Return the FileResource at the given path relative to #getTemplateDirectory().
 DirectoryResource getRootTemplateDirectory()
          Get the DirectoryResource representing the directory this Project uses to store templates across all scaffold providers.
 DirectoryResource getTemplateDirectory(String provider)
          Get the DirectoryResource representing the directory this Project uses to store templates for the provided scaffold provider.
 
Methods inherited from interface org.jboss.forge.project.Facet
getProject, install, isInstalled, setProject, uninstall
 

Method Detail

getRootTemplateDirectory

DirectoryResource getRootTemplateDirectory()
Get the DirectoryResource representing the directory this Project uses to store templates across all scaffold providers.


getTemplateDirectory

DirectoryResource getTemplateDirectory(String provider)
Get the DirectoryResource representing the directory this Project uses to store templates for the provided scaffold provider.


createResource

FileResource<?> createResource(InputStream data,
                               String provider,
                               String relativeFilename)
At the given path/filename relative to the scaffold provider specific directory under the project templates directory: #getTemplateDirectory() - create a file containing the given bytes. The provider name cannot be null.

Returns:
a handle to the FileResource that was created.

createResource

FileResource<?> createResource(char[] data,
                               String provider,
                               String relativeFilename)
At the given path/filename relative to the scaffold provider specific directory under the project templates directory: #getTemplateDirectory() - create a file containing the given bytes. The provider name cannot be null.

Returns:
a handle to the FileResource that was created.

createResource

FileResource<?> createResource(String data,
                               String provider,
                               String relativeFilename)
At the given path/filename relative to the scaffold provider specific directory under the project templates directory: #getTemplateDirectory() - create a file containing the given bytes. The provider name cannot be null.

Returns:
a handle to the FileResource that was created.

getResource

FileResource<?> getResource(String provider,
                            String relativePath)
Return the FileResource at the given path relative to #getTemplateDirectory(). The FileResource object is returned regardless of whether the target actually exists. To determine if the file exists, you should call FileResource.exists() on the return value of this method.


Forge - Parent 1.4.2-SNAPSHOT

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.