public class AdjunctsInPage
extends java.lang.Object
Adjuncts are already included.| Modifier and Type | Method and Description |
|---|---|
void |
assumeIncluded(java.util.Collection<java.lang.String> includes) |
void |
assumeIncluded(java.lang.String... includes)
When you include your version of the adjunct externally, you can use
this method to inform
AdjunctsInPage that those adjuncts are
already included in the page. |
void |
generate(org.apache.commons.jelly.XMLOutput out,
java.lang.String... includes)
Generates the script tag and CSS link tag to include necessary adjuncts,
and records the fact that those adjuncts are already included in the page,
so that it won't be loaded again.
|
static AdjunctsInPage |
get()
Obtains the instance associated with the current request of the given
StaplerRequest. |
static AdjunctsInPage |
get(StaplerRequest request)
Obtains the instance associated with the current request of the given
StaplerRequest. |
java.util.Set<java.lang.String> |
getIncluded()
Gets what has been already included/assumed.
|
boolean |
isIncluded(java.lang.String include)
Checks if something has already been included/assumed.
|
void |
spool(java.lang.String... includes)
Works like the
generate(XMLOutput, String...) method
but just put the adjuncts to pending without writing it. |
void |
writeSpooled(org.apache.commons.jelly.XMLOutput out)
Writes out what's spooled by
spool(String...) method. |
public static AdjunctsInPage get()
StaplerRequest.public static AdjunctsInPage get(StaplerRequest request)
StaplerRequest.
This method is handy when the caller already have the request object around,
so that we can save Stapler.getCurrentRequest() call.
public java.util.Set<java.lang.String> getIncluded()
public boolean isIncluded(java.lang.String include)
public void generate(org.apache.commons.jelly.XMLOutput out,
java.lang.String... includes)
throws java.io.IOException,
org.xml.sax.SAXException
java.io.IOExceptionorg.xml.sax.SAXExceptionpublic void assumeIncluded(java.lang.String... includes)
throws java.io.IOException,
org.xml.sax.SAXException
AdjunctsInPage that those adjuncts are
already included in the page.java.io.IOExceptionorg.xml.sax.SAXExceptionpublic void assumeIncluded(java.util.Collection<java.lang.String> includes)
throws java.io.IOException,
org.xml.sax.SAXException
java.io.IOExceptionorg.xml.sax.SAXExceptionpublic void spool(java.lang.String... includes)
throws java.io.IOException,
org.xml.sax.SAXException
generate(XMLOutput, String...) method
but just put the adjuncts to pending without writing it.java.io.IOExceptionorg.xml.sax.SAXExceptionpublic void writeSpooled(org.apache.commons.jelly.XMLOutput out)
throws org.xml.sax.SAXException,
java.io.IOException
spool(String...) method.org.xml.sax.SAXExceptionjava.io.IOExceptionCopyright © 2015. All Rights Reserved.