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, wait
getSitePlanRoot
public Env()
public Env(ICS ics)
ics
- public void init(ICS ics)
public java.lang.String getString(java.lang.String var)
Content
public java.lang.String getString(java.lang.String list, java.lang.String field)
Env
public java.lang.String getString(java.lang.String list, int row, java.lang.String field)
Env
public java.lang.String getString(java.lang.String list, int row)
Content
public int getSize(java.lang.String list)
Content
public java.lang.Iterable<java.lang.Integer> getRange(java.lang.String list)
Content
public java.util.Date getDate(java.lang.String var)
Content
public java.lang.Integer getInt(java.lang.String var)
Content
public java.lang.Long getLong(java.lang.String var)
Content
public java.util.Date getDate(java.lang.String ls, java.lang.String field)
Env
public java.lang.Integer getInt(java.lang.String ls, java.lang.String field)
Env
public java.lang.Long getLong(java.lang.String ls, java.lang.String field)
Env
public java.util.Date getDate(java.lang.String ls, int pos, java.lang.String field)
Env
public java.util.Date getDate(java.lang.String ls, int pos)
Content
public java.lang.Long getLong(java.lang.String ls, int pos, java.lang.String field)
Env
public java.lang.Long getLong(java.lang.String ls, int pos)
Content
public java.lang.Integer getInt(java.lang.String ls, int pos, java.lang.String field)
Env
public java.lang.Integer getInt(java.lang.String ls, int pos)
Content
public int getError()
Env
public boolean isError()
Env
public boolean isVar(java.lang.String variable)
Env
public boolean isList(java.lang.String list)
Env
public boolean isList(java.lang.String list, int n)
Env
public boolean isListCol(java.lang.String list, java.lang.String field)
Env
public boolean isObj(java.lang.String object)
Env
public boolean isInsite()
Env
public java.lang.Object getObject(java.lang.String object)
Env
public Asset getAsset(java.lang.String c, java.lang.Long cid)
public Asset getAsset()
public java.lang.String getC()
Env
public java.lang.Long getCid()
Env
public Config getConfig()
Env
public Router getRouter()
Env
public java.lang.String getSiteName()
Env
getSiteName
in interface Env
public java.lang.String getSiteId()
Env
public SitePlan getSitePlan()
getSitePlan
in interface Env
public java.lang.String getUrl(Id id, Arg... args)
Env
public java.lang.String getUrl(java.lang.String c, java.lang.Long cid, Arg... args)
Env
public java.util.List<Id> find(java.lang.String type, Arg... args)
Env
public java.lang.String call(java.lang.String name, Arg... args)
Env
public void clearError()
Env
clearError
in interface Env
public void addDependency()
Env
addDependency
in interface Env
public void addDependency(java.lang.String c)
Env
addDependency
in interface Env
public void addDependency(java.lang.String c, java.lang.Long cid)
Env
addDependency
in interface Env
public void addDependency(java.lang.String c, java.lang.Long cid, AssetDeps deps)
Env
addDependency
in interface Env
public void addDependency(Id id)
Env
addDependency
in interface Env
public void addDependency(Id id, AssetDeps deps)
Env
addDependency
in interface Env
public boolean exists(java.lang.String attribute)
Content
public boolean exists(java.lang.String attribute, int pos)
Content
public ICS ics()
Env
public 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
-