public class ExtensionDeclaration extends NamedDeclaration<ExtensionDeclaration> implements ConnectedDeclaration<ExtensionDeclaration>, WithSourcesDeclaration<ExtensionDeclaration>, WithOperationsDeclaration<ExtensionDeclaration>, WithFunctionsDeclaration<ExtensionDeclaration>, WithConstructsDeclaration<ExtensionDeclaration>
ExtensionModel
. It contains raw, unvalidated
data which is used to declare the structure of a ExtensionModel
addModelProperty, getDescription, getDisplayModel, getModelProperties, getModelProperty, setDescription, setDisplayModel
public List<ConfigurationDeclaration> getConfigurations()
ConfigurationDeclaration
instances
that have been declared so far.null
public ExtensionDeclaration addConfig(ConfigurationDeclaration config)
ConfigurationDeclaration
config
- a not null
ConfigurationDeclaration
{@link
- IllegalArgumentException} if config
is null
public List<ConstructDeclaration> getConstructs()
getConstructs
in interface WithConstructsDeclaration<ExtensionDeclaration>
List
with
the available ConstructDeclaration
spublic ExtensionDeclaration addConstruct(ConstructDeclaration declaration)
ConstructDeclaration
addConstruct
in interface WithConstructsDeclaration<ExtensionDeclaration>
declaration
- the declaration to be addedthis
declarerpublic List<OperationDeclaration> getOperations()
getOperations
in interface WithOperationsDeclaration<ExtensionDeclaration>
List
with
the available OperationDeclaration
spublic List<ConnectionProviderDeclaration> getConnectionProviders()
getConnectionProviders
in interface ConnectedDeclaration<ExtensionDeclaration>
List
with the available ConnectionProviderDeclaration
spublic List<SourceDeclaration> getMessageSources()
getMessageSources
in interface WithSourcesDeclaration<ExtensionDeclaration>
List
with the available SourceDeclaration
spublic ExtensionDeclaration addConnectionProvider(ConnectionProviderDeclaration connectionProvider)
addConnectionProvider
in interface ConnectedDeclaration<ExtensionDeclaration>
connectionProvider
- a not null
ConnectionProviderDeclaration
this
declarationIllegalArgumentException
- if connectionProvider
is null
public ExtensionDeclaration addOperation(OperationDeclaration operation)
OperationDeclaration
addOperation
in interface WithOperationsDeclaration<ExtensionDeclaration>
operation
- a not null
OperationDeclaration
this
declaration{@link
- IllegalArgumentException} if operation
is null
public ExtensionDeclaration addMessageSource(SourceDeclaration sourceDeclaration)
SourceDeclaration
addMessageSource
in interface WithSourcesDeclaration<ExtensionDeclaration>
sourceDeclaration
- a not null
SourceDeclaration
this
declaration{@link
- IllegalArgumentException} if sourceDeclaration
is null
public ExtensionDeclaration addFunction(FunctionDeclaration function)
FunctionDeclaration
addFunction
in interface WithFunctionsDeclaration<ExtensionDeclaration>
function
- the provider's declarationthis
declarationpublic List<FunctionDeclaration> getFunctions()
getFunctions
in interface WithFunctionsDeclaration<ExtensionDeclaration>
List
with the FunctionDeclaration
which have been
added to this
declarationpublic Set<ObjectType> getTypes()
Set
with all the types registered through getTypes()
public Set<String> getResources()
Set
with the paths to all of the resources exposed by the
declared extensionpublic Set<String> getPrivilegedPackages()
Set
with all the Java package name that are registered as privileged APIpublic Set<String> getPrivilegedArtifacts()
Set
with all the artifact IDs that are registered to have access to the privileged API. Each artifact is defined using Maven's groupId:artifactIdpublic ExtensionDeclaration addType(ObjectType objectType)
objectType
objectType
- an ObjectType
this
declarationpublic ExtensionDeclaration addResource(String resourcePath)
resourcePath
resourcePath
- the relative path to the extension's resourcethis
declarationpublic ExtensionDeclaration addPrivilegedPackage(String packageName)
packageName
- the Java package name to be exportedthis
declarationpublic ExtensionDeclaration addPrivilegedArtifact(String artifactId)
artifactId
- the artifactId that the extension provides access to the privileged APIthis
declarationpublic ExtensionDeclaration addImportedType(ImportedTypeModel importedType)
importedType
- a ImportedTypeModel
with the import informationthis
declarationpublic ExtensionDeclaration addExternalLibrary(ExternalLibraryModel externalLibraryModel)
ExternalLibraryModel
externalLibraryModel
- the model of the external library to be referencedthis
declarerpublic void addSubtype(MetadataType baseType, MetadataType subType)
subType
as an implementation of the baseType
baseType
- a base typesubType
- a sub type implementationpublic void addSubtypes(MetadataType baseType, Collection<MetadataType> subTypes)
subTypes
as implementations of the baseType
baseType
- a base typesubTypes
- a Collection
of sub type implementationspublic Set<SubTypesModel> getSubTypes()
Map
with the subType mappings declared through addSubtype(MetadataType, MetadataType)
and addSubtypes(MetadataType, Collection)
public Set<ExternalLibraryModel> getExternalLibraryModels()
Set
of ExternalLibraryModel
which represent the extension's external librariespublic String getName()
getName
in interface NamedObject
getName
in class NamedDeclaration<ExtensionDeclaration>
public void setName(String name)
public String getVersion()
public String getVendor()
public void setVendor(String vendor)
public Category getCategory()
public void setCategory(Category category)
public XmlDslModel getXmlDslModel()
public void setXmlDslModel(XmlDslModel xmlDslModel)
public Set<ImportedTypeModel> getImportedTypes()
public void addErrorModel(ErrorModel errorModel)
public Set<ErrorModel> getErrorModels()
public void addNotificationModel(NotificationModel notificationModel)
public Set<NotificationModel> getNotificationModels()
Copyright © 2018. All rights reserved.