@Entity public class Application extends Object implements Comparable<Application>
| Modifier and Type | Class and Description |
|---|---|
static class |
Application.TreeCache |
| Modifier and Type | Field and Description |
|---|---|
static String |
DETAIL_GLOBAL_LAYOUT |
static String |
DETAIL_IS_MASHUP |
static String |
DETAIL_LAST_SPINUP_TIME |
Map<String,Long> |
idMap |
static Set<String> |
preventClearDetails |
| Constructor and Description |
|---|
Application() |
| Modifier and Type | Method and Description |
|---|---|
void |
authorizationsModified() |
int |
compareTo(Application o) |
Application |
createMashup(String mashupName,
javax.persistence.EntityManager em,
boolean linkComponents) |
Application |
createWorkVersion(javax.persistence.EntityManager em,
String version,
net.sourceforge.stripes.action.ActionBeanContext context) |
Application |
deepCopy() |
Date |
getAuthorizationsModified() |
List<Bookmark> |
getBookmarks() |
Set<ConfiguredComponent> |
getComponents() |
Map<String,ClobElement> |
getDetails() |
org.json.JSONObject |
getGlobalLayout() |
Long |
getId() |
String |
getLang() |
String |
getLayout() |
List<Application> |
getMashups(javax.persistence.EntityManager em) |
BoundingBox |
getMaxExtent() |
String |
getName() |
String |
getNameWithVersion() |
User |
getOwner() |
String |
getProjectionCode() |
Set<String> |
getReaders() |
Level |
getRoot() |
BoundingBox |
getStartExtent() |
List<StartLayer> |
getStartLayers() |
List<StartLevel> |
getStartLevels() |
String |
getTitle() |
Application.TreeCache |
getTreeCache() |
String |
getVersion() |
boolean |
isAuthenticatedRequired() |
Boolean |
isMashup()
slow method -especially on Oracle- because it will need all keys and
Oracle lazy loading sucks so clob's get pulled in as well.
|
Boolean |
isMashup(org.hibernate.Session sess)
fast access to determine if we are mashup.
|
Application.TreeCache |
loadTreeCache(javax.persistence.EntityManager em) |
void |
postPersist() |
void |
processBookmarks(Application previousApplication,
net.sourceforge.stripes.action.ActionBeanContext context,
javax.persistence.EntityManager em) |
void |
removeOldProperties() |
void |
setAuthenticatedRequired(boolean authenticatedRequired) |
void |
setAuthorizationsModified(Date authorizationsModified) |
void |
setBookmarks(List<Bookmark> bookmarks) |
void |
setComponents(Set<ConfiguredComponent> components) |
void |
setDetails(Map<String,ClobElement> details) |
void |
setGlobalLayout(String globalLayout) |
void |
setId(Long id) |
void |
setLang(String lang) |
void |
setLayout(String layout) |
void |
setMaxExtent(BoundingBox maxExtent) |
void |
setName(String name) |
void |
setOwner(User owner) |
void |
setProjectionCode(String projectionCode) |
void |
setReaders(Set<String> readers) |
void |
setRoot(Level root) |
void |
setStartExtent(BoundingBox startExtent) |
void |
setStartLayers(List<StartLayer> startLayers) |
void |
setStartLevels(List<StartLevel> startLevels) |
void |
setTitle(String title) |
void |
setTreeCache(Application.TreeCache treeCache) |
void |
setVersion(String version) |
org.json.JSONObject |
toJSON(javax.servlet.http.HttpServletRequest request,
boolean validXmlTags,
boolean onlyServicesAndLayers,
boolean includeAppLayerAttributes,
boolean includeRelations,
javax.persistence.EntityManager em,
boolean shouldProcessCache)
Create a JSON representation for use in browser to start this
application.
|
org.json.JSONObject |
toJSON(javax.servlet.http.HttpServletRequest request,
boolean validXmlTags,
boolean onlyServicesAndLayers,
javax.persistence.EntityManager em) |
void |
transferMashupComponents(Application newApp,
javax.persistence.EntityManager em) |
void |
transferMashupLevels(Application old,
javax.persistence.EntityManager em)
When a workversion of an application is published, sometimes (determined
by the user) the mashups should "follow" the published version: the
mashup should always point to the published version.
|
public static final String DETAIL_IS_MASHUP
public static final String DETAIL_GLOBAL_LAYOUT
public static final String DETAIL_LAST_SPINUP_TIME
public Long getId()
public void setId(Long id)
public String getName()
public void setName(String name)
public String getVersion()
public void setVersion(String version)
public String getTitle()
public void setLang(String lang)
public String getLang()
public void setTitle(String title)
public String getLayout()
public void setLayout(String layout)
public Map<String,ClobElement> getDetails()
public void setDetails(Map<String,ClobElement> details)
public boolean isAuthenticatedRequired()
public void setAuthenticatedRequired(boolean authenticatedRequired)
public Set<ConfiguredComponent> getComponents()
public void setComponents(Set<ConfiguredComponent> components)
public BoundingBox getMaxExtent()
public void setMaxExtent(BoundingBox maxExtent)
public User getOwner()
public void setOwner(User owner)
public Level getRoot()
public void setRoot(Level root)
public BoundingBox getStartExtent()
public void setStartExtent(BoundingBox startExtent)
public Date getAuthorizationsModified()
public void setAuthorizationsModified(Date authorizationsModified)
public List<StartLayer> getStartLayers()
public void setStartLayers(List<StartLayer> startLayers)
public List<StartLevel> getStartLevels()
public void setStartLevels(List<StartLevel> startLevels)
public String getProjectionCode()
public void setProjectionCode(String projectionCode)
public String getNameWithVersion()
public Application.TreeCache getTreeCache()
public int compareTo(Application o)
compareTo in interface Comparable<Application>public void setTreeCache(Application.TreeCache treeCache)
public Application.TreeCache loadTreeCache(javax.persistence.EntityManager em)
public void authorizationsModified()
public org.json.JSONObject toJSON(javax.servlet.http.HttpServletRequest request,
boolean validXmlTags,
boolean onlyServicesAndLayers,
javax.persistence.EntityManager em)
throws org.json.JSONException
org.json.JSONExceptionpublic org.json.JSONObject toJSON(javax.servlet.http.HttpServletRequest request,
boolean validXmlTags,
boolean onlyServicesAndLayers,
boolean includeAppLayerAttributes,
boolean includeRelations,
javax.persistence.EntityManager em,
boolean shouldProcessCache)
throws org.json.JSONException
request - servlet request to check authorisationvalidXmlTags - true if valid xml names should be producedonlyServicesAndLayers - true if only services and layers
should be returnedincludeAppLayerAttributes - true if applayer attributes
should be includedincludeRelations - true if relations should be includedem - the entity manager to useshouldProcessCache - Flag if the cache should be processed (filtering the layers/levels according to the logged in user)org.json.JSONException - if transforming to json failspublic Boolean isMashup()
true if we are a mashupisMashup(org.hibernate.Session)public Boolean isMashup(org.hibernate.Session sess)
sess - the hibernate sessiontrue if we are a mashup, this may be a cached valueisMashup()public Application createMashup(String mashupName, javax.persistence.EntityManager em, boolean linkComponents) throws Exception
Exceptionpublic Application createWorkVersion(javax.persistence.EntityManager em, String version, net.sourceforge.stripes.action.ActionBeanContext context) throws Exception
Exceptionpublic List<Application> getMashups(javax.persistence.EntityManager em)
public Application deepCopy() throws Exception
Exceptionpublic void transferMashupLevels(Application old, javax.persistence.EntityManager em)
old - The Application to which the layerIds should be matched.em - the entity manager to usepublic void transferMashupComponents(Application newApp, javax.persistence.EntityManager em)
public void postPersist()
public void processBookmarks(Application previousApplication, net.sourceforge.stripes.action.ActionBeanContext context, javax.persistence.EntityManager em)
public void removeOldProperties()
public void setGlobalLayout(String globalLayout)
public org.json.JSONObject getGlobalLayout()
throws org.json.JSONException
org.json.JSONExceptionCopyright © 2019. All rights reserved.