Class WorkItemAdapterFactory
java.lang.Object
com.day.cq.workflow.compatibility.WorkItemAdapterFactory
- All Implemented Interfaces:
AdapterFactory
@Property(name="service.description",value="Adapts different types of workitemsn") @Property(name="adapter.condition",value="All Granite WorkItems can be adapted to CQ WorkItems")
@Service({AdapterFactory.class,WorkItemAdapterFactory.class})
public class WorkItemAdapterFactory
extends Object
implements AdapterFactory
-
Field Summary
Fields inherited from interface org.apache.sling.api.adapter.AdapterFactory
SERVICE_NAME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<AdapterType>
AdapterTypegetAdapter
(Object adaptable, Class<AdapterType> type) Adapt the given object to the adaptable type.
-
Constructor Details
-
WorkItemAdapterFactory
public WorkItemAdapterFactory()
-
-
Method Details
-
getAdapter
Description copied from interface:AdapterFactory
Adapt the given object to the adaptable type. The adaptable object is guaranteed to be an instance of one of the classes listed in theAdapterFactory.ADAPTABLE_CLASSES
services registration property. The type parameter is one of the classes listed in theAdapterFactory.ADAPTER_CLASSES
service registration properties.This method may return
null
if the adaptable object cannot be adapted to the adapter (target) type for any reason. In this case, the implementation should log a message to the log facility noting the cause for not being able to adapt.Note that the
adaptable
object is not required to implement theAdaptable
interface, though most of the time this method is called by means of calling theAdaptable.adaptTo(Class)
method.- Specified by:
getAdapter
in interfaceAdapterFactory
- Type Parameters:
AdapterType
- The generic type of the adapter (target) type.- Parameters:
adaptable
- The object to adapt to the adapter type.type
- The type to which the object is to be adapted.- Returns:
- The adapted object or
null
if this factory instance cannot adapt the object.
-