public interface ApplicationPackage
Modifier and Type | Field and Description |
---|---|
static String |
COMPONENT_DIR |
static String |
CONFIG_DEFINITIONS_DIR
Do not use
|
static com.yahoo.path.Path |
DEPLOYMENT_FILE |
static String |
DOCPROCCHAINS_DIR |
static String |
EXT_DIR |
static String |
HOSTS |
static com.yahoo.path.Path |
PAGE_TEMPLATES_DIR |
static String |
PERMANENT_SERVICES |
static String |
PROCESSORCHAINS_DIR |
static com.yahoo.path.Path |
QUERY_PROFILE_TYPES_DIR |
static com.yahoo.path.Path |
QUERY_PROFILES_DIR |
static String |
RANKEXPRESSION_NAME_SUFFIX |
static String |
ROUTINGTABLES_DIR |
static com.yahoo.path.Path |
RULES_DIR |
static String |
RULES_NAME_SUFFIX |
static String |
SD_NAME_SUFFIX |
static com.yahoo.path.Path |
SEARCH_DEFINITIONS_DIR |
static String |
SEARCHCHAINS_DIR |
static String |
SERVICES |
static String |
TEMPLATES_DIR |
static com.yahoo.path.Path |
VALIDATION_OVERRIDES |
Modifier and Type | Method and Description |
---|---|
Map<com.yahoo.vespa.config.ConfigDefinitionKey,UnparsedConfigDefinition> |
getAllExistingConfigDefs()
Returns all the config definitions available in this package as unparsed data.
|
default Optional<com.yahoo.config.provision.AllocatedHosts> |
getAllocatedHosts()
Returns the host allocation info of this, or empty if no allocation is available
|
String |
getApplicationName()
The name of the application package
|
static Map<String,String> |
getBundleSdFiles(String path,
JarFile bundle)
Returns the name-payload pairs of any sd files under path/searchdefinitions/ in the given jar bundle
|
List<ComponentInfo> |
getComponentsInfo(com.yahoo.config.provision.Version vespaVersion) |
Optional<Reader> |
getDeployment() |
ApplicationFile |
getFile(com.yahoo.path.Path relativePath)
Gets a file from the root of the application package
|
static String |
getFileName(JarEntry je)
The name of an SD in a JarEntry
|
default File |
getFileReference(com.yahoo.path.Path pathRelativeToAppDir) |
default Map<com.yahoo.config.provision.Version,FileRegistry> |
getFileRegistryMap() |
default List<com.yahoo.io.reader.NamedReader> |
getFiles(com.yahoo.path.Path pathFromRoot,
String suffix)
Same as getFiles(pathFromRoot,suffix,false)
|
List<com.yahoo.io.reader.NamedReader> |
getFiles(com.yahoo.path.Path pathFromRoot,
String suffix,
boolean recurse)
Returns the files in a directory as readers.
|
Reader |
getHosts()
Contents of hosts.xml.
|
String |
getHostSource() |
default Optional<Integer> |
getMajorVersion()
Returns the major version this application is valid for, or empty if it is valid for all versions
|
default ApplicationMetaData |
getMetaData()
Gets the ApplicationMetaData instance for this application package.
|
default List<com.yahoo.io.reader.NamedReader> |
getPageTemplateFiles()
Does
getFiles(com.yahoo.path.Path, java.lang.String, boolean) on the page template directory and gets all xml files |
default Map<com.yahoo.config.provision.Version,com.yahoo.config.provision.AllocatedHosts> |
getProvisionInfoMap()
Deprecated.
please use #getAllocatedHosts
|
default List<com.yahoo.io.reader.NamedReader> |
getQueryProfileFiles()
Does
getFiles(com.yahoo.path.Path, java.lang.String, boolean) on the query profile directory and gets all xml files |
default List<com.yahoo.io.reader.NamedReader> |
getQueryProfileTypeFiles()
Does
getFiles(com.yahoo.path.Path, java.lang.String, boolean) on the query profile directory and gets all xml files |
Reader |
getRankingExpression(String name)
Reads a ranking expression from file to a string and returns it.
|
Collection<com.yahoo.io.reader.NamedReader> |
getSearchDefinitions() |
Reader |
getServices()
Contents of services.xml.
|
String |
getServicesSource() |
default List<String> |
getUserIncludeDirs()
Returns the include dirs given by the user in the services.xml file.
|
Optional<Reader> |
getValidationOverrides() |
default ApplicationPackage |
preprocess(com.yahoo.config.provision.Zone zone,
RuleConfigDeriver ruleConfigDeriver,
DeployLogger logger)
Preprocess an application for a given zone and return a new application package pointing to the preprocessed
application package.
|
Collection<com.yahoo.io.reader.NamedReader> |
searchDefinitionContents()
Readers for all the search definition files for this.
|
default void |
validateIncludeDir(String dirName) |
default void |
validateXML() |
default void |
validateXML(Optional<com.yahoo.config.provision.Version> vespaVersion) |
default void |
writeMetaData() |
static final String HOSTS
static final String SERVICES
static final com.yahoo.path.Path SEARCH_DEFINITIONS_DIR
static final String COMPONENT_DIR
static final String TEMPLATES_DIR
static final String SEARCHCHAINS_DIR
static final String DOCPROCCHAINS_DIR
static final String PROCESSORCHAINS_DIR
static final String ROUTINGTABLES_DIR
static final String CONFIG_DEFINITIONS_DIR
static final com.yahoo.path.Path QUERY_PROFILES_DIR
static final com.yahoo.path.Path QUERY_PROFILE_TYPES_DIR
static final com.yahoo.path.Path PAGE_TEMPLATES_DIR
static final com.yahoo.path.Path RULES_DIR
static final com.yahoo.path.Path DEPLOYMENT_FILE
static final com.yahoo.path.Path VALIDATION_OVERRIDES
static final String SD_NAME_SUFFIX
static final String RANKEXPRESSION_NAME_SUFFIX
static final String RULES_NAME_SUFFIX
static final String EXT_DIR
static final String PERMANENT_SERVICES
String getApplicationName()
Reader getServices()
Reader getHosts()
default List<String> getUserIncludeDirs()
default void validateIncludeDir(String dirName)
Collection<com.yahoo.io.reader.NamedReader> searchDefinitionContents()
Map<com.yahoo.vespa.config.ConfigDefinitionKey,UnparsedConfigDefinition> getAllExistingConfigDefs()
List<com.yahoo.io.reader.NamedReader> getFiles(com.yahoo.path.Path pathFromRoot, String suffix, boolean recurse)
pathFromRoot
- the relative path string from the root of the application packagesuffix
- the suffix of files to return, or null to return allrecurse
- return files in all subdirectories (recursively) as welldefault List<com.yahoo.io.reader.NamedReader> getFiles(com.yahoo.path.Path pathFromRoot, String suffix)
default Optional<Integer> getMajorVersion()
ApplicationFile getFile(com.yahoo.path.Path relativePath)
relativePath
- The relative path of the file within this application package.IllegalArgumentException
- if the given path does not existdefault List<com.yahoo.io.reader.NamedReader> getQueryProfileFiles()
getFiles(com.yahoo.path.Path, java.lang.String, boolean)
on the query profile directory and gets all xml filesdefault List<com.yahoo.io.reader.NamedReader> getQueryProfileTypeFiles()
getFiles(com.yahoo.path.Path, java.lang.String, boolean)
on the query profile directory and gets all xml filesdefault List<com.yahoo.io.reader.NamedReader> getPageTemplateFiles()
getFiles(com.yahoo.path.Path, java.lang.String, boolean)
on the page template directory and gets all xml filesString getHostSource()
String getServicesSource()
List<ComponentInfo> getComponentsInfo(com.yahoo.config.provision.Version vespaVersion)
Reader getRankingExpression(String name)
name
- the name of the file to return, relative to the search definition directory in the application packageIllegalArgumentException
- if the file was not found or could not be readstatic Map<String,String> getBundleSdFiles(String path, JarFile bundle) throws IOException
bundle
- The jar file, which will be closed afterwards by this method.path
- For example 'complex/'IOException
- if it is reading sd files failsdefault ApplicationMetaData getMetaData()
default File getFileReference(com.yahoo.path.Path pathRelativeToAppDir)
default void validateXML() throws IOException
IOException
default void validateXML(Optional<com.yahoo.config.provision.Version> vespaVersion) throws IOException
IOException
default void writeMetaData() throws IOException
IOException
@Deprecated default Map<com.yahoo.config.provision.Version,com.yahoo.config.provision.AllocatedHosts> getProvisionInfoMap()
default Optional<com.yahoo.config.provision.AllocatedHosts> getAllocatedHosts()
default Map<com.yahoo.config.provision.Version,FileRegistry> getFileRegistryMap()
Collection<com.yahoo.io.reader.NamedReader> getSearchDefinitions()
default ApplicationPackage preprocess(com.yahoo.config.provision.Zone zone, RuleConfigDeriver ruleConfigDeriver, DeployLogger logger) throws IOException, TransformerException, ParserConfigurationException, SAXException
zone
- A valid Zone
instance, used to decide which parts of services to keep and removeruleConfigDeriver
- ignoredlogger
- A DeployLogger
to add output that will be returned to the userIOException
TransformerException
ParserConfigurationException
SAXException
Copyright © 2017. All rights reserved.