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
SourceFactory
for content attributes.
-
-
Field Summary
Fields Modifier and Type Field Description protected Context
_context
The contextprotected AmetysObjectResolver
_resolver
The resolverstatic String
ATTRIBUTE_SCHEME
source 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 URIvoid
contextualize(Context context)
Source
getSource(String location, Map parameters)
void
release(Source source)
void
service(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:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getSource
public Source getSource(String location, Map parameters) throws IOException, MalformedURLException
- Specified by:
getSource
in interfaceSourceFactory
- Throws:
IOException
MalformedURLException
-
_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:
release
in interfaceSourceFactory
-
-