Class ContributionBuilder
- java.lang.Object
-
- org.nuxeo.runtime.model.persistence.AbstractContribution
-
- org.nuxeo.runtime.model.persistence.ContributionBuilder
-
- All Implemented Interfaces:
Contribution
,StreamRef
public class ContributionBuilder extends AbstractContribution
- Author:
- Bogdan Stefanescu
-
-
Field Summary
Fields Modifier and Type Field Description protected String
bundle
protected DocumentBuilderFactory
dbfac
protected List<String>
extensions
-
Fields inherited from class org.nuxeo.runtime.model.persistence.AbstractContribution
description, disabled, id, loaded, name
-
-
Constructor Summary
Constructors Constructor Description ContributionBuilder(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addExtension(String target, String point, Object... contribs)
void
addExtension(String target, String point, List<Object> contribs)
void
addXmlExtension(String target, String point, String content)
URL
asURL()
Get an URL to that stream.String
getContent()
Gets the contribution XML content.String
getDescription()
Gets the contribution description.InputStream
getStream()
Gets the contribution XML content.boolean
isDisabled()
Whether this contribution should be automatically installed at startup.void
setBundle(String bundle)
void
setDisabled(boolean isDisabled)
Sets the auto install flag for this contribution.-
Methods inherited from class org.nuxeo.runtime.model.persistence.AbstractContribution
getId, getName, load, setDescription
-
-
-
-
Field Detail
-
dbfac
protected final DocumentBuilderFactory dbfac
-
extensions
protected final List<String> extensions
-
-
Constructor Detail
-
ContributionBuilder
public ContributionBuilder(String name)
-
-
Method Detail
-
asURL
public URL asURL()
Description copied from interface:StreamRef
Get an URL to that stream. May return null if no URL is available.
-
getDescription
public String getDescription()
Description copied from interface:Contribution
Gets the contribution description.- Specified by:
getDescription
in interfaceContribution
- Overrides:
getDescription
in classAbstractContribution
-
isDisabled
public boolean isDisabled()
Description copied from interface:Contribution
Whether this contribution should be automatically installed at startup.- Specified by:
isDisabled
in interfaceContribution
- Overrides:
isDisabled
in classAbstractContribution
-
setDisabled
public void setDisabled(boolean isDisabled)
Description copied from interface:Contribution
Sets the auto install flag for this contribution.- Specified by:
setDisabled
in interfaceContribution
- Overrides:
setDisabled
in classAbstractContribution
-
addXmlExtension
public void addXmlExtension(String target, String point, String content)
-
addExtension
public void addExtension(String target, String point, Object... contribs)
-
addExtension
public void addExtension(String target, String point, List<Object> contribs)
-
getContent
public String getContent()
Description copied from interface:Contribution
Gets the contribution XML content. The content should be in Nuxeo XML component format.
-
getStream
public InputStream getStream()
Description copied from interface:Contribution
Gets the contribution XML content. The content should be in Nuxeo XML component format.
-
-