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 Stringbundleprotected DocumentBuilderFactorydbfacprotected 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 voidaddExtension(String target, String point, Object... contribs)voidaddExtension(String target, String point, List<Object> contribs)voidaddXmlExtension(String target, String point, String content)URLasURL()Get an URL to that stream.StringgetContent()Gets the contribution XML content.StringgetDescription()Gets the contribution description.InputStreamgetStream()Gets the contribution XML content.booleanisDisabled()Whether this contribution should be automatically installed at startup.voidsetBundle(String bundle)voidsetDisabled(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:StreamRefGet an URL to that stream. May return null if no URL is available.
-
getDescription
public String getDescription()
Description copied from interface:ContributionGets the contribution description.- Specified by:
getDescriptionin interfaceContribution- Overrides:
getDescriptionin classAbstractContribution
-
isDisabled
public boolean isDisabled()
Description copied from interface:ContributionWhether this contribution should be automatically installed at startup.- Specified by:
isDisabledin interfaceContribution- Overrides:
isDisabledin classAbstractContribution
-
setDisabled
public void setDisabled(boolean isDisabled)
Description copied from interface:ContributionSets the auto install flag for this contribution.- Specified by:
setDisabledin interfaceContribution- Overrides:
setDisabledin 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:ContributionGets the contribution XML content. The content should be in Nuxeo XML component format.
-
getStream
public InputStream getStream()
Description copied from interface:ContributionGets the contribution XML content. The content should be in Nuxeo XML component format.
-
-