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
ConstructorDescriptionResourceDescriptor
(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 fragmentstatic URL2
getLinkParametersAsStylesheet
(Map<String, List<? extends Term>> params) Return the MediaTypeClass<? extends ReportOutput>
Return the list of Class objects passed into the constructorReturn the ReportFactoryReturn the list of Class objects passed into the constructorgetURL()
Return the URLboolean
isWarning
(int warning) toString()
withAccept
(String accept) Create a new ResourceDescriptor that is this one with the specified "accept" headerwithAcceptLanguage
(String acceptLanguage) Create a new ResourceDescriptor that is this one with the specified "accept-language" headerwithDefaultCharset
(String charset) withDocument
(org.faceless.publisher.Document document) withLinkParameters
(Map<String, List<? extends Term>> params) Create a new ResourceDescriptor that is this one with the specified linked paramswithMediaType
(MediaType mediaType) Create a new ResourceDescriptor that is this one with the specified MediaTypewithOutputClass
(Class<? extends ReportOutput> outputClass) withoutWarning
(int warning) Create a new ResourceDescriptor that is this one with the specified warning disabledwithProcessingInstructions
(List<ProcessingInstruction> processingInstructions) Create a new ResourceDescriptor that is this one with the specified list of document Processing Instructionsboolean
wouldAccept
(Class<?>... classList) Return true if this ResourceDescriptor would accept a resource of the specified classboolean
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
-
withURL
-
withMediaType
Create a new ResourceDescriptor that is this one with the specified MediaType -
withProcessingInstructions
public ResourceDescriptor withProcessingInstructions(List<ProcessingInstruction> processingInstructions) Create a new ResourceDescriptor that is this one with the specified list of document Processing Instructions -
withAccept
Create a new ResourceDescriptor that is this one with the specified "accept" header -
withAcceptLanguage
Create a new ResourceDescriptor that is this one with the specified "accept-language" header -
withLinkParameters
Create a new ResourceDescriptor that is this one with the specified linked params -
withDocument
-
withOutputClass
-
withDefaultCharset
-
withoutWarning
Create a new ResourceDescriptor that is this one with the specified warning disabled -
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
-
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 -
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 -
isWarning
public boolean isWarning(int warning) -
getLinkParameters
-
getLinkParametersAsStylesheet
-
toString
-