Package org.ametys.cms.content
Class AttributeSourceFactory
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.cms.content.AttributeSourceFactory
-
- All Implemented Interfaces:
LogEnabled,Component,Contextualizable,Serviceable,ThreadSafe,SourceFactory
- Direct Known Subclasses:
TaskAttributeSourceFactory
public class AttributeSourceFactory extends AbstractLogEnabled implements SourceFactory, ThreadSafe, Serviceable, Contextualizable
SourceFactoryfor content attributes.
-
-
Field Summary
Fields Modifier and Type Field Description protected Context_contextThe contextprotected AmetysObjectResolver_resolverThe resolverstatic StringATTRIBUTE_SCHEMEsource scheme-
Fields inherited from interface org.apache.excalibur.source.SourceFactory
ROLE
-
-
Constructor Summary
Constructors Constructor Description AttributeSourceFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Binary_getBinary(ModelAwareDataAwareAmetysObject object, String attribute, String filename)Get binaryprotected ModelAwareDataAwareAmetysObject_getModelAwareDataAwareAmetysObject()Get model aware data aware ametys objectprotected String_getURI(String location)Get URIvoidcontextualize(Context context)SourcegetSource(String location, Map parameters)voidrelease(Source source)voidservice(ServiceManager manager)-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
ATTRIBUTE_SCHEME
public static final String ATTRIBUTE_SCHEME
source scheme- See Also:
- Constant Field Values
-
_resolver
protected AmetysObjectResolver _resolver
The resolver
-
-
Constructor Detail
-
AttributeSourceFactory
public AttributeSourceFactory()
-
-
Method Detail
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
getSource
public Source getSource(String location, Map parameters) throws IOException, MalformedURLException
- Specified by:
getSourcein interfaceSourceFactory- Throws:
IOExceptionMalformedURLException
-
_getBinary
protected Binary _getBinary(ModelAwareDataAwareAmetysObject object, String attribute, String filename)
Get binary- Parameters:
object- the ametys objectattribute- the attributfilename- the filename- Returns:
- the binary
-
_getURI
protected String _getURI(String location)
Get URI- Parameters:
location- the location- Returns:
- the uri
-
_getModelAwareDataAwareAmetysObject
protected ModelAwareDataAwareAmetysObject _getModelAwareDataAwareAmetysObject()
Get model aware data aware ametys object- Returns:
- model aware data aware ametys object
-
release
public void release(Source source)
- Specified by:
releasein interfaceSourceFactory
-
-