Interface Marshaller<EntityType>
-
- Type Parameters:
EntityType- The managed Java type.
- All Known Implementing Classes:
AbstractCSVWriter,AbstractJsonEnricher,AbstractJsonReader,AbstractJsonWriter,AbstractLayoutJsonWriter,ACLJsonEnricher,ACPJsonWriter,AggregateJsonWriter,AnnotationJsonReader,AnnotationJsonWriter,AnnotationListJsonReader,AnnotationListJsonWriter,AuditJsonEnricher,AuthenticationTokenListWriter,AuthenticationTokenWriter,BasePermissionsJsonEnricher,BinaryManagerStatusJsonWriter,BlobAppLinksJsonEnricher,BlobJsonReader,BlobPreviewJsonEnricher,BreadcrumbJsonEnricher,BulkCommandJsonReader,BulkCommandJsonWriter,BulkStatusJsonReader,BulkStatusJsonWriter,CapabilitiesJsonWriter,ChildrenJsonEnricher,CollectionsJsonEnricher,CommentJsonReader,CommentJsonWriter,CommentListJsonReader,CommentListJsonWriter,ConfigurationPropertiesJsonWriter,ConstraintJsonWriter,ConstraintListJsonWriter,ContextualParametersJsonEnricher,DefaultListJsonReader,DefaultListJsonWriter,DirectoryEntryJsonReader,DirectoryEntryJsonWriter,DirectoryEntryListJsonReader,DirectoryEntryListJsonWriter,DirectoryJsonWriter,DirectoryListJsonWriter,DocumentModelCSVWriter,DocumentModelJsonReader,DocumentModelJsonReaderLegacy,DocumentModelJsonWriter,DocumentModelListCSVWriter,DocumentModelListJsonReader,DocumentModelListJsonWriter,DocumentPropertiesJsonReader,DocumentPropertyCSVWriter,DocumentPropertyJsonWriter,DocumentRouteListWriter,DocumentRouteWriter,DocumentTypeJsonWriter,DocumentTypeListJsonWriter,DocumentUrlJsonEnricher,DocumentValidationReportJsonWriter,EntityJsonReader,ExtensibleEntityJsonWriter,FacetJsonWriter,FacetListJsonWriter,FavoritesJsonEnricher,FieldDefinitionJsonWriter,FirstAccessibleAncestorJsonEnricher,GraphRouteWriter,HasContentJsonEnricher,HasFolderishChildJsonEnricher,HighlightJsonEnricher,LayoutDefinitionJsonWriter,LayoutDefinitionsJsonWriter,LayoutJsonWriter,LayoutTypeConfigurationJsonWriter,LayoutTypeDefinitionJsonWriter,LayoutTypeDefinitionsJsonWriter,LogEntryCSVWriter,LogEntryJsonWriter,LogEntryListCSVWriter,LogEntryListJsonWriter,MigrationJsonWriter,MigrationListJsonWriter,NotificationsJsonEnricher,NuxeoGroupJsonReader,NuxeoGroupJsonWriter,NuxeoGroupListJsonReader,NuxeoGroupListJsonWriter,NuxeoOAuth2ServiceProviderListWriter,NuxeoOAuth2ServiceProviderReader,NuxeoOAuth2ServiceProviderWriter,NuxeoOAuth2TokenListWriter,NuxeoOAuth2TokenReader,NuxeoOAuth2TokenWriter,NuxeoPrincipalJsonReader,NuxeoPrincipalJsonWriter,NuxeoPrincipalListJsonReader,NuxeoPrincipalListJsonWriter,OAuth2ClientListWriter,OAuth2ClientReader,OAuth2ClientWriter,PendingTasksJsonEnricher,PreviewJsonEnricher,ProbeInfoJsonWriter,ProbeInfoListJsonWriter,ProbeStatusJsonWriter,PublicationJsonEnricher,RenderingInfoJsonWriter,RenditionJsonEnricher,RunnableWorkflowJsonEnricher,RunningWorkflowJsonEnricher,SavedSearchListReader,SavedSearchListWriter,SavedSearchRequestReader,SavedSearchWriter,ScheduleJsonWriter,ScheduleListJsonWriter,SchemaJsonWriter,SchemaListJsonWriter,SimplifiedServerInfoJsonWriter,SubtypesJsonEnricher,SubtypesJsonEnricher,TagsJsonEnricher,TaskCompletionRequestJsonReader,TaskCompletionRequestLegacyJsonReader,TaskListWriter,TaskWriter,ThumbnailJsonEnricher,UserProfileEnricher,UserVisiblePermissionsJsonEnricher,WidgetDefinitionJsonWriter,WidgetReferenceJsonWriter,WidgetSelectOptionJsonWriter,WidgetTypeConfigurationJsonWriter,WidgetTypeDefinitionJsonWriter,WidgetTypeDefinitionsJsonWriter,WOPIJsonEnricher,WorkflowRequestJsonReader,WorkflowRequestLegacyJsonReader
public interface Marshaller<EntityType>Interface of Java type converter.You must add
Setupannotation to every class implementing this interface. You should addSupportsannotation to define supported mimetype. You can addInjectannotation to your properties to get currentRenderingContextor any Nuxeo service.To get an instance of this class with injected properties, call
MarshallerRegistry.getInstance(RenderingContext, Class).- Since:
- 7.2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanaccept(Class<?> clazz, Type genericType, javax.ws.rs.core.MediaType mediatype)Checks if this marshaller can handle the marshalling request.
-
-
-
Method Detail
-
accept
boolean accept(Class<?> clazz, Type genericType, javax.ws.rs.core.MediaType mediatype)
Checks if this marshaller can handle the marshalling request.Please note it's useless to check that clazz is an instance of EntityType or if generic type and entity type are compatible (unlike JAX-RS which just checks the clazz, not the generic type). It's also useless to check
Supportsis compatible with mediatype. This is already done by theMarshallerRegistryThis method implementation can use injected properties. So you can check the current
RenderingContextto accept or reject a marshalling request.- Parameters:
clazz- The type to marshall.genericType- The generic type to marshall.mediatype- The managed mimetype.- Returns:
- true if this converter handle the request, false otherwise.
- Since:
- 7.2
-
-