Package org.faceless.publisher.resource
Class ResourceDescriptor
java.lang.Object
org.faceless.publisher.resource.ResourceDescriptor
Describes a Resource. 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
ConstructorsConstructorDescriptionResourceDescriptor
(Class<?>... resourceClasses) Create a new ResourceDescriptorResourceDescriptor
(ReportFactory reportFactory, Class<?>... resourceClasses) ResourceDescriptor
(ResourceDescriptor descriptor, Class<?>... resourceClasses) -
Method Summary
Modifier and TypeMethodDescriptionReturn the "Accept" header that should be sent with this ResourceDescriptor.Return the "Accept-Language" header that should be sent with this ResourceDescriptor.Return the default charsetReturn the URL fragmentReturn the MediaTypeClass<? extends ReportOutput>
Return the type ofReportOutput
this ResourceDescriptor applies to, or null if it applies to allReturn the list of Class objects passed into the constructorReturn the ReportFactoryReturn the list of Class objects passed into the constructorgetURL()
Return the URLtoString()
boolean
wouldAccept
(Class<?>... classList) Return true if this ResourceDescriptor would accept a resource of the specified class(es).boolean
wouldAcceptObject
(Object object) Return true if this ResourceDescriptor would accept the specified Objectboolean
wouldBeAcceptedBy
(Class<?>... classList) Return true if the output accepted by this ResourceDescriptor would be accepted by the supplied Class (opposite of wouldAccept)
-
Constructor Details
-
ResourceDescriptor
-
ResourceDescriptor
-
ResourceDescriptor
Create a new ResourceDescriptor- Parameters:
reportFactory
- the factoryurl
- the URLresourceClasses
- the class-list that the resource must match
-
-
Method Details
-
getReportFactory
Return the ReportFactory -
getURL
Return the URL -
getFragment
Return the URL fragment -
getMediaType
Return the MediaType -
getAccept
Return the "Accept" header that should be sent with this ResourceDescriptor. -
getAcceptLanguage
Return the "Accept-Language" header that should be sent with this ResourceDescriptor. -
getDefaultCharset
Return the default charset -
getResourceClasses
Return the list of Class objects passed into the constructor -
getOutputClass
Return the type ofReportOutput
this ResourceDescriptor applies to, or null if it applies to all -
getProcessingInstructions
Return the list of Class objects passed into the constructor -
wouldAccept
Return true if this ResourceDescriptor would accept a resource of the specified class(es). -
wouldBeAcceptedBy
Return true if the output accepted by this ResourceDescriptor would be accepted by the supplied Class (opposite of wouldAccept) -
wouldAcceptObject
Return true if this ResourceDescriptor would accept the specified Object -
toString
-