public class SavedApplicationFactoryBean extends GateAwareObject implements org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.DisposableBean
gate:
extension namespace:
<gate:saved-application location="WEB-INF/application.gapp" />See
Init
for details of how to declare this namespace in your
bean definition files. We first attempt to resolve the location as a
File, if this fails we fall back to resolving it as a URL. This is
useful with servlet context resources (with an expanded web
application) as it will give a file:
URL rather than
an opaque scheme like jndi:
(Tomcat). The element also
supports a nested <gate:customisers>
element,
giving a list of ResourceCustomiser
s that will be applied to
the application after it is loaded.Constructor and Description |
---|
SavedApplicationFactoryBean() |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroy the resource created by this bean, by passing it to
Factory.deleteResource(gate.Resource) . |
Object |
getObject()
Loads the saved application file and applies any registered
customisers.
|
Class<?> |
getObjectType() |
boolean |
isSingleton() |
void |
setCustomisers(List<ResourceCustomiser> customisers) |
void |
setLocation(org.springframework.core.io.Resource location) |
ensureGateInit, setBeanFactory
public void setLocation(org.springframework.core.io.Resource location)
public void setCustomisers(List<ResourceCustomiser> customisers)
public Object getObject() throws gate.util.GateException, IOException
getObject
in interface org.springframework.beans.factory.FactoryBean
gate.util.GateException
IOException
public Class<?> getObjectType()
getObjectType
in interface org.springframework.beans.factory.FactoryBean
public boolean isSingleton()
isSingleton
in interface org.springframework.beans.factory.FactoryBean
public void destroy() throws Exception
Factory.deleteResource(gate.Resource)
. This will in turn delete
any PRs that the application contains.destroy
in interface org.springframework.beans.factory.DisposableBean
Exception
Copyright © 2023 GATE. All rights reserved.