Modifier and Type | Method and Description |
---|---|
void |
assumeIncluded(Collection<String> includes) |
void |
assumeIncluded(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,
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 . |
Set<String> |
getIncluded()
Gets what has been already included/assumed.
|
boolean |
isIncluded(String include)
Checks if something has already been included/assumed.
|
void |
spool(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 Set<String> getIncluded()
public boolean isIncluded(String include)
public void generate(org.apache.commons.jelly.XMLOutput out, String... includes) throws IOException, SAXException
IOException
SAXException
public void assumeIncluded(String... includes) throws IOException, SAXException
AdjunctsInPage
that those adjuncts are
already included in the page.IOException
SAXException
public void assumeIncluded(Collection<String> includes) throws IOException, SAXException
IOException
SAXException
public void spool(String... includes) throws IOException, SAXException
generate(XMLOutput, String...)
method
but just put the adjuncts to pending
without writing it.IOException
SAXException
public void writeSpooled(org.apache.commons.jelly.XMLOutput out) throws SAXException, IOException
spool(String...)
method.SAXException
IOException
Copyright © 2015. All rights reserved.