public abstract class DefinitionMetadataBuilder extends Object
DefinitionProvider
. For example,
the name() method could be called several times before a provider is registered in a Registry
.
They are also responsible for determining the referenceId string used by the registries. Implement your own, or use
one of the static factory methods.usingModuleAndRelativePathAsId()
,
usingNameAsId()
Modifier and Type | Class and Description |
---|---|
static class |
DefinitionMetadataBuilder.DefinitionMetadataImpl
Implementation of
DefinitionMetadata . |
Modifier | Constructor and Description |
---|---|
protected |
DefinitionMetadataBuilder() |
Modifier and Type | Method and Description |
---|---|
DefinitionMetadata |
build() |
protected abstract String |
buildReferenceId() |
DefinitionMetadataBuilder |
configurationSourceType(ConfigurationSourceType configurationSourceType) |
DefinitionMetadataBuilder |
location(String location) |
DefinitionMetadataBuilder |
module(String module) |
DefinitionMetadataBuilder |
name(String name) |
DefinitionMetadataBuilder |
relativeLocation(String relativeLocation) |
DefinitionMetadataBuilder |
type(DefinitionType type) |
static DefinitionMetadataBuilder |
usingModuleAndRelativePathAsId()
A convenience static factory method which returns a DefinitionMetadataBuilder which generates referenceId using the <module-name>:<relative-location> form.
|
static DefinitionMetadataBuilder |
usingNameAsId()
A convenience static factory method which returns a DefinitionMetadataBuilder which generates referenceId using the name property.
|
public static DefinitionMetadataBuilder usingModuleAndRelativePathAsId()
public static DefinitionMetadataBuilder usingNameAsId()
public DefinitionMetadataBuilder type(DefinitionType type)
public DefinitionMetadataBuilder name(String name)
public DefinitionMetadataBuilder module(String module)
public DefinitionMetadataBuilder location(String location)
public DefinitionMetadataBuilder relativeLocation(String relativeLocation)
public DefinitionMetadataBuilder configurationSourceType(ConfigurationSourceType configurationSourceType)
public DefinitionMetadata build()
protected abstract String buildReferenceId()
Copyright © 2003–2017 Magnolia International Ltd.. All rights reserved.