| Constructor and Description |
|---|
Env()
Build the env - with this costructor you have an invalid env that still
needs to be initialized with init to be usable
|
Env(ICS ics)
Build the env from the ICS and initialize it
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDependency()
Add a dependency on anything
|
void |
addDependency(Id id)
Add an EXACT dependency on a given asset
|
void |
addDependency(Id id,
AssetDeps deps)
Add a dependency of the specified type on a given asset
|
void |
addDependency(java.lang.String c)
Add a dependency on any asset of the given type
|
void |
addDependency(java.lang.String c,
java.lang.Long cid)
Add an EXACT dependency on a given asset
|
void |
addDependency(java.lang.String c,
java.lang.Long cid,
AssetDeps deps)
Add a dependency of the specified type on a given asset
|
java.lang.String |
call(java.lang.String name,
Arg... args)
Call a CS Element in current site
|
void |
clearError()
Clear the current error code
|
java.lang.String |
dump()
Dump all the variables (NOT the lists...)
|
java.lang.String |
dump(java.lang.String name)
Dump the list with the given name
|
boolean |
exists(java.lang.String attribute)
Check if the give attribute is a valid value
|
boolean |
exists(java.lang.String attribute,
int pos)
Check if the given attribute at the given position is a valid value
|
java.util.List<Id> |
find(java.lang.String type,
Arg... args)
Find assets
|
Asset |
findOne(java.lang.String type,
Arg... args)
Find one assets
|
Asset |
getAsset()
Return the asset identified by the current c/cid
|
Asset |
getAsset(Id id)
Return the asset identified by and Id (or null if not found)
|
Asset |
getAsset(java.lang.String c,
java.lang.Long cid)
Return the asset identified by c/cid (or null if not possible)
|
java.lang.String |
getC()
Return current "c" (content type)
|
java.lang.Long |
getCid()
Return current "cid" (content id)
|
Config |
getConfig()
Return the current config
|
java.util.Date |
getDate(java.lang.String var)
Return the first attribute of the the attribute list as an int, or null
if not found
|
java.util.Date |
getDate(java.lang.String ls,
int pos)
Return the nth attribute of the the attribute list as an int, or null if
not found
|
java.util.Date |
getDate(java.lang.String ls,
int pos,
java.lang.String field)
Get field at given position as a date, or null
|
java.util.Date |
getDate(java.lang.String ls,
java.lang.String field)
Get field as date or null
|
int |
getError()
Get Error nummber
|
Id |
getId()
Return current asset id
|
java.lang.Integer |
getInt(java.lang.String var)
Return the first attribute of the the attribute list as an int, or null
if not found
|
java.lang.Integer |
getInt(java.lang.String ls,
int pos)
Return the nth attribute of the the attribute list as an int, or null if
not found
|
java.lang.Integer |
getInt(java.lang.String ls,
int pos,
java.lang.String field)
Get field at given position as an int, or null
|
java.lang.Integer |
getInt(java.lang.String ls,
java.lang.String field)
Get field as long or null
|
java.lang.Long |
getLong(java.lang.String var)
Get variable as Long or null
|
java.lang.Long |
getLong(java.lang.String ls,
int pos)
Get the nth variable as Long or null
|
java.lang.Long |
getLong(java.lang.String ls,
int pos,
java.lang.String field)
Get field at given position as a long, or null
|
java.lang.Long |
getLong(java.lang.String ls,
java.lang.String field)
Get field as long or null
|
java.lang.Object |
getObject(java.lang.String object)
Get an object
|
java.lang.Iterable<java.lang.Integer> |
getRange(java.lang.String list)
Return an iterable of the indexes of the attribute
|
Router |
getRouter()
Return the current router
|
java.lang.String |
getSiteId()
The current site id
|
java.lang.String |
getSiteName()
The current site name
|
SitePlan |
getSitePlan() |
int |
getSize(java.lang.String list)
Return the number of elements in the attribute
|
java.lang.String |
getString(java.lang.String var)
Return the first attribute of the the named attribute as a string, or
null if not found
|
java.lang.String |
getString(java.lang.String list,
int row)
Return the nth named attribute as a string, or null if not found
|
java.lang.String |
getString(java.lang.String list,
int row,
java.lang.String field)
Get the nth field of a list or null
|
java.lang.String |
getString(java.lang.String list,
java.lang.String field)
Get the field of a list or null
|
java.lang.String |
getUrl(Id id,
Arg... args)
Return the URL to render this asset - note that rendering is different if
we are in insite/preview mode or in live mode
|
java.lang.String |
getUrl(java.lang.String c,
java.lang.Long cid,
Arg... args)
Return the URL to render this asset
|
ICS |
ics()
Return the underlying ICS
|
void |
init(ICS ics)
Initialize the env - second step constructor
|
boolean |
isError()
Check if in error state
|
boolean |
isInsite()
Check if we are in the insite editing mode
|
boolean |
isList(java.lang.String list)
Check if it is a list
|
boolean |
isList(java.lang.String list,
int n)
Check if it is a list with enough rows
|
boolean |
isListCol(java.lang.String list,
java.lang.String field)
Check if exists as a list column
|
boolean |
isObj(java.lang.String object)
Check if exists as an object
|
boolean |
isVar(java.lang.String variable)
Check if is a variable
|
void |
unpackVar(java.lang.String var,
java.lang.String packed)
unpacks a var and puts it in ICS.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSitePlanRootpublic Env()
public Env(ICS ics)
ics - public void init(ICS ics)
public java.lang.String getString(java.lang.String var)
Contentpublic java.lang.String getString(java.lang.String list,
java.lang.String field)
Envpublic java.lang.String getString(java.lang.String list,
int row,
java.lang.String field)
Envpublic java.lang.String getString(java.lang.String list,
int row)
Contentpublic int getSize(java.lang.String list)
Contentpublic java.lang.Iterable<java.lang.Integer> getRange(java.lang.String list)
Contentpublic java.util.Date getDate(java.lang.String var)
Contentpublic java.lang.Integer getInt(java.lang.String var)
Contentpublic java.lang.Long getLong(java.lang.String var)
Contentpublic java.util.Date getDate(java.lang.String ls,
java.lang.String field)
Envpublic java.lang.Integer getInt(java.lang.String ls,
java.lang.String field)
Envpublic java.lang.Long getLong(java.lang.String ls,
java.lang.String field)
Envpublic java.util.Date getDate(java.lang.String ls,
int pos,
java.lang.String field)
Envpublic java.util.Date getDate(java.lang.String ls,
int pos)
Contentpublic java.lang.Long getLong(java.lang.String ls,
int pos,
java.lang.String field)
Envpublic java.lang.Long getLong(java.lang.String ls,
int pos)
Contentpublic java.lang.Integer getInt(java.lang.String ls,
int pos,
java.lang.String field)
Envpublic java.lang.Integer getInt(java.lang.String ls,
int pos)
Contentpublic int getError()
Envpublic boolean isError()
Envpublic boolean isVar(java.lang.String variable)
Envpublic boolean isList(java.lang.String list)
Envpublic boolean isList(java.lang.String list,
int n)
Envpublic boolean isListCol(java.lang.String list,
java.lang.String field)
Envpublic boolean isObj(java.lang.String object)
Envpublic boolean isInsite()
Envpublic java.lang.Object getObject(java.lang.String object)
Envpublic Asset getAsset(java.lang.String c, java.lang.Long cid)
public Asset getAsset()
public java.lang.String getC()
Envpublic java.lang.Long getCid()
Envpublic Config getConfig()
Envpublic Router getRouter()
Envpublic java.lang.String getSiteName()
EnvgetSiteName in interface Envpublic java.lang.String getSiteId()
Envpublic SitePlan getSitePlan()
getSitePlan in interface Envpublic java.lang.String getUrl(Id id, Arg... args)
Envpublic java.lang.String getUrl(java.lang.String c,
java.lang.Long cid,
Arg... args)
Envpublic java.util.List<Id> find(java.lang.String type, Arg... args)
Envpublic java.lang.String call(java.lang.String name,
Arg... args)
Envpublic void clearError()
EnvclearError in interface Envpublic void addDependency()
EnvaddDependency in interface Envpublic void addDependency(java.lang.String c)
EnvaddDependency in interface Envpublic void addDependency(java.lang.String c,
java.lang.Long cid)
EnvaddDependency in interface Envpublic void addDependency(java.lang.String c,
java.lang.Long cid,
AssetDeps deps)
EnvaddDependency in interface Envpublic void addDependency(Id id)
EnvaddDependency in interface Envpublic void addDependency(Id id, AssetDeps deps)
EnvaddDependency in interface Envpublic boolean exists(java.lang.String attribute)
Contentpublic boolean exists(java.lang.String attribute,
int pos)
Contentpublic ICS ics()
Envpublic java.lang.String dump()
public java.lang.String dump(java.lang.String name)
public void unpackVar(java.lang.String var,
java.lang.String packed)
var - packed -