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
Modifier and TypeFieldDescriptionprotected Context
The contextprotected AmetysObjectResolver
The resolverstatic final String
source schemeFields inherited from interface org.apache.excalibur.source.SourceFactory
ROLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Binary
_getBinary
(ModelAwareDataAwareAmetysObject object, String attribute, String filename) Get binaryprotected ModelAwareDataAwareAmetysObject
Get model aware data aware ametys objectprotected String
Get URIvoid
contextualize
(Context context) void
void
service
(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ATTRIBUTE_SCHEME
source scheme- See Also:
-
_context
The context -
_resolver
The resolver
-
-
Constructor Details
-
AttributeSourceFactory
public AttributeSourceFactory()
-
-
Method Details
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getSource
- 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
Get URI- Parameters:
location
- the location- Returns:
- the uri
-
_getModelAwareDataAwareAmetysObject
Get model aware data aware ametys object- Returns:
- model aware data aware ametys object
-
release
- Specified by:
release
in interfaceSourceFactory
-