Package org.faceless.publisher.resource
Class ResourceFlavorDescriptor
java.lang.Object
org.faceless.publisher.resource.ResourceFlavorDescriptor
Describes a ResourceFlavor. This fully describes the
Resource
requested
by the Report, and is used by a ResourceLoader
to determine whether it
can load for this object or not.-
Constructor Summary
ConstructorsConstructorDescriptionResourceFlavorDescriptor
(ReportFactory reportFactory, String fragment, Class<?>[] resourceClasses, Class<? extends ReportOutput> outputClass, MediaType mediaType) Create a new ResourceFlavorDescriptorResourceFlavorDescriptor
(ReportFactory reportFactory, String fragment, Class<?> resourceClass, Class<? extends ReportOutput> outputClass, MediaType mediaType) Create a new ResourceFlavorDescriptor -
Method Summary
Modifier and TypeMethodDescriptionReturn the "Accept" header that should be sent with this ResourceFlavorDescriptor.Return the "Accept-Language" header that should be sent with this ResourceFlavorDescriptor.Return the Fragment passed into the constructorReturn the MediaType passed into the constructorClass<? extends ReportOutput>
Return the ReportOutput passed into the constructorReturn the ReportFactory passed into the constructorCollection<Class<?>>
Return the list of Class objects passed into the constructortoString()
boolean
wouldAccept
(Class<?>... classList) Return true if this ResourceFlavorDescriptor would accept a resource of the specified classboolean
wouldAcceptObject
(Object object) Return true if this ResourceFlavorDescriptor would accept the specified Object
-
Constructor Details
-
ResourceFlavorDescriptor
public ResourceFlavorDescriptor(ReportFactory reportFactory, String fragment, Class<?> resourceClass, Class<? extends ReportOutput> outputClass, MediaType mediaType) Create a new ResourceFlavorDescriptor- Parameters:
reportFactory
- the factoryfragment
- the URI fragmentresourceClass
- the Class of the Resource objectoutputClass
- the ReportOutput type this Resource is formediaType
- the mediaType
-
ResourceFlavorDescriptor
public ResourceFlavorDescriptor(ReportFactory reportFactory, String fragment, Class<?>[] resourceClasses, Class<? extends ReportOutput> outputClass, MediaType mediaType) Create a new ResourceFlavorDescriptor- Parameters:
reportFactory
- the factoryfragment
- the URI fragmentresourceClasses
- the list of acceptable Classes of the Resource objectoutputClass
- the ReportOutput type this Resource is formediaType
- the mediaType
-
-
Method Details
-
getReportFactory
Return the ReportFactory passed into the constructor -
getMediaType
Return the MediaType passed into the constructor -
getAccept
Return the "Accept" header that should be sent with this ResourceFlavorDescriptor. -
getAcceptLanguage
Return the "Accept-Language" header that should be sent with this ResourceFlavorDescriptor. -
getFragment
Return the Fragment passed into the constructor -
getResourceClasses
Return the list of Class objects passed into the constructor -
wouldAccept
Return true if this ResourceFlavorDescriptor would accept a resource of the specified class -
wouldAcceptObject
Return true if this ResourceFlavorDescriptor would accept the specified Object -
getOutputClass
Return the ReportOutput passed into the constructor -
toString
-