| Constructor and Description |
|---|
Asset(Env env,
java.lang.String c,
java.lang.Long cid) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
call(java.lang.String template,
Arg... args)
Call the template by name with current c/cid, specifiying a slot name and
eventually some extra optional args.
|
java.lang.String |
dump()
Dump the core fields of the asset
|
java.lang.String |
dump(java.lang.String name)
Dump the attribute with the given name
|
java.lang.String |
editString(java.lang.String attribute)
Edit (or return the value if not insite) the attribute as a string, or
|
java.lang.String |
editString(java.lang.String attribute,
int n)
Edit (or return the value if not insite) the nth attribute as a string,
or
|
java.lang.String |
editString(java.lang.String attribute,
int n,
java.lang.String params,
Arg... args)
Edit (or return the value if not insite) the first named attribute as a
string, or null if not found and pass additional parameters
|
java.lang.String |
editString(java.lang.String attribute,
java.lang.String params,
Arg... args)
Edit (or return if not insite) the first named attribute as a string, or
null if not found and pass additional parameters
|
java.lang.String |
editText(java.lang.String attribute,
int n,
java.lang.String params)
Edit (or return if not insite) the nth named attribute as a string, or
null if not found and pass additional parameters using the CK editor
|
java.lang.String |
editText(java.lang.String attribute,
java.lang.String params)
Edit (or return if not insite) the named attribute as a string, or null
if not found and pass additional parameters using the CK editor
|
boolean |
exists(java.lang.String attribute)
Does the attribute exist?
|
boolean |
exists(java.lang.String attribute,
int pos)
Does the nth attribute exist?
|
Asset |
getAsset(java.lang.String attribute,
int i,
java.lang.String type,
AssetDeps deps)
Return the related asset pointed by the nth attribute of the given type
if not found
Since you are accessing another asset it is mandatory to specify the
dependency type you are going to use.
|
Asset |
getAsset(java.lang.String attribute,
java.lang.String type)
Return the specified asset.
|
Asset |
getAsset(java.lang.String attribute,
java.lang.String type,
AssetDeps deps)
Return the related asset pointed by the attribute of the given type if
not found
|
Asset |
getAsset(java.lang.String attribute,
java.lang.String type,
int i)
Return the specified asset at the nth position.
|
java.lang.Long |
getAssocId(java.lang.String assoc)
Id of the first associated asset
|
java.lang.Long |
getAssocId(java.lang.String assoc,
int pos)
Id of the nth associated asset
|
java.lang.Iterable<java.lang.Integer> |
getAssocRange(java.lang.String assoc)
Range of an asset association
|
java.lang.String |
getAssocType(java.lang.String assoc)
Type of the first associated asset
|
java.lang.String |
getAssocType(java.lang.String assoc,
int pos)
Type of the nth associated asset
|
java.lang.String |
getBlobUrl(java.lang.String attribute,
Arg... args)
String get blob url of the first attribute
|
java.lang.String |
getBlobUrl(java.lang.String attribute,
int pos,
java.lang.String mimeType,
Arg... args)
String get blob url of the nth attribute
|
java.lang.String |
getBlobUrl(java.lang.String attribute,
java.lang.String mimeType,
Arg... args)
String get blob url of the first attribute
|
java.lang.Long |
getCid(java.lang.String attribute)
Return the first attribute of the attribute list as an id (long), or null
if not found
|
java.lang.Long |
getCid(java.lang.String attribute,
int n)
Return the nth attribute of the attribute list as an id (long), or null
if not found
|
java.util.Date |
getDate(java.lang.String attribute)
Return the first attribute of the the attribute list as a date, or null
if not found
|
java.util.Date |
getDate(java.lang.String attribute,
int n)
Return the nth attribute of the the attribute list as a date, or null if
not found
|
java.lang.String |
getDescription()
Return the description field of the asset
|
java.util.Date |
getEndDate()
Return the end date field of the asset
|
java.util.Date |
getFieldDate(java.lang.String name)
Return a named field from the asset as a date.
|
int |
getFieldInt(java.lang.String name)
Return a named field from the asset as an int.
|
long |
getFieldLong(java.lang.String name)
Return a named field from the asset as a long.
|
java.lang.String |
getFieldString(java.lang.String name)
Return a named field from the asset as a string.
|
java.lang.String |
getFilename()
Return the file field of the asset
|
java.lang.Integer |
getInt(java.lang.String attribute)
Return the first attribute of the the attribute list as an int, or null
if not found
|
java.lang.Integer |
getInt(java.lang.String attribute,
int n)
Return the nth attribute of the the attribute list as an int, or null if
not found
|
java.lang.Long |
getLong(java.lang.String attribute)
Return the first attribute of the the attribute list as a long, or null
if not found
|
java.lang.Long |
getLong(java.lang.String attribute,
int n)
Return the nth attribute of the the attribute list as an int, or null if
not found
|
java.lang.String |
getName()
Return the name field of the asset
|
java.lang.String |
getPath()
Return the path field of the asset
|
java.lang.Iterable<java.lang.Integer> |
getRange(java.lang.String attribute)
Return an iterable of the attribute list
|
int |
getSize(java.lang.String attribute)
Return the number of elements in the attribute
|
java.util.Date |
getStartDate()
Return the start date field of the asset
|
java.lang.String |
getString(java.lang.String attribute)
Return the first attribute of the the attribute rib as a string, or the
null if not found
Since you are accessing another asset it is mandatory to specify the
dependency type you are going to use.
|
java.lang.String |
getString(java.lang.String attribute,
int n)
Return the nth attribute of the the attribute as a string, or the void
string if not found
|
java.lang.String |
getTemplate()
Return the description field of the asset
|
java.lang.String |
getUrl(Arg... args)
Return the URL to render this asset
|
boolean |
isAttribute(java.lang.String attribute)
Check if the attribute exist
|
boolean |
isAttribute(java.lang.String attribute,
int n)
Check if the attribute at the given position exists
|
boolean |
isInsite()
Return if we are in insite editing
|
java.lang.String |
slot(java.lang.String attribute,
int i,
java.lang.String type,
java.lang.String template,
java.lang.String emptyText,
Arg... args)
Render a single slot pointed by the i-th asset field using the the
specified template.
|
java.lang.String |
slot(java.lang.String attribute,
java.lang.String type,
java.lang.String template,
java.lang.String emptyText,
Arg... args)
Render a single slot pointed by the first asset field using the the
specified template.
|
java.lang.String |
slotEmpty(java.lang.String attribute,
java.lang.String type,
java.lang.String template,
java.lang.String emptyText)
Render an empty slot to drag additional content to a list.
|
java.lang.String |
slotList(java.lang.String attribute,
java.lang.String type,
java.lang.String template,
Arg... args)
Render a list of slots pointed by the asset field using the the specified
template.
|
getC, getCid, getId, getSite, getSubtype, init, setDescription, toStringpublic Asset(Env env, java.lang.String c, java.lang.Long cid)
public java.lang.String getFieldString(java.lang.String name)
getFieldString in interface Assetname - public java.util.Date getFieldDate(java.lang.String name)
getFieldDate in interface Assetname - public int getFieldInt(java.lang.String name)
getFieldInt in interface Assetname - public long getFieldLong(java.lang.String name)
getFieldLong in interface Assetname - public java.lang.String getName()
public java.lang.String getDescription()
getDescription in interface AssetgetDescription in class AssetBasepublic java.lang.String getTemplate()
getTemplate in interface AssetgetTemplate in class AssetBasepublic java.lang.String getFilename()
getFilename in interface AssetgetFilename in class AssetBasepublic java.lang.String getPath()
public java.util.Date getStartDate()
getStartDate in interface AssetgetStartDate in class AssetBasepublic java.util.Date getEndDate()
getEndDate in interface AssetgetEndDate in class AssetBasepublic boolean isAttribute(java.lang.String attribute)
attribute - public boolean isAttribute(java.lang.String attribute,
int n)
attribute - public boolean isInsite()
public java.lang.Iterable<java.lang.Integer> getRange(java.lang.String attribute)
public int getSize(java.lang.String attribute)
public java.lang.Long getCid(java.lang.String attribute)
public java.lang.Long getCid(java.lang.String attribute,
int n)
public Asset getAsset(java.lang.String attribute, java.lang.String type)
public Asset getAsset(java.lang.String attribute, java.lang.String type, int i)
public Asset getAsset(java.lang.String attribute, java.lang.String type, AssetDeps deps)
public Asset getAsset(java.lang.String attribute, int i, java.lang.String type, AssetDeps deps)
public java.lang.String getString(java.lang.String attribute)
public java.lang.String getString(java.lang.String attribute,
int n)
public java.lang.String editString(java.lang.String attribute,
int n,
java.lang.String params,
Arg... args)
editString in interface Assetpublic java.lang.String editString(java.lang.String attribute)
editString in interface Assetpublic java.lang.String editString(java.lang.String attribute,
int n)
editString in interface Assetpublic java.lang.String editString(java.lang.String attribute,
java.lang.String params,
Arg... args)
editString in interface Assetattribute - args - public java.lang.String editText(java.lang.String attribute,
int n,
java.lang.String params)
public java.lang.String editText(java.lang.String attribute,
java.lang.String params)
public java.lang.Integer getInt(java.lang.String attribute)
public java.lang.Integer getInt(java.lang.String attribute,
int n)
public java.lang.Long getLong(java.lang.String attribute)
public java.lang.Long getLong(java.lang.String attribute,
int n)
public java.util.Date getDate(java.lang.String attribute)
public java.lang.Iterable<java.lang.Integer> getAssocRange(java.lang.String assoc)
getAssocRange in interface Assetpublic java.lang.Long getAssocId(java.lang.String assoc)
getAssocId in interface Assetpublic java.lang.Long getAssocId(java.lang.String assoc,
int pos)
getAssocId in interface Assetpublic java.lang.String getAssocType(java.lang.String assoc)
getAssocType in interface Assetpublic java.lang.String getAssocType(java.lang.String assoc,
int pos)
getAssocType in interface Assetpublic java.util.Date getDate(java.lang.String attribute,
int n)
public java.lang.String getBlobUrl(java.lang.String attribute,
Arg... args)
getBlobUrl in interface Assetpublic java.lang.String getBlobUrl(java.lang.String attribute,
java.lang.String mimeType,
Arg... args)
getBlobUrl in interface Assetpublic java.lang.String getBlobUrl(java.lang.String attribute,
int pos,
java.lang.String mimeType,
Arg... args)
getBlobUrl in interface Assetpublic java.lang.String call(java.lang.String template,
Arg... args)
public java.lang.String slotList(java.lang.String attribute,
java.lang.String type,
java.lang.String template,
Arg... args)
throws java.lang.IllegalArgumentException
public java.lang.String slotEmpty(java.lang.String attribute,
java.lang.String type,
java.lang.String template,
java.lang.String emptyText)
throws java.lang.IllegalArgumentException
public java.lang.String slot(java.lang.String attribute,
int i,
java.lang.String type,
java.lang.String template,
java.lang.String emptyText,
Arg... args)
throws java.lang.IllegalArgumentException
public java.lang.String slot(java.lang.String attribute,
java.lang.String type,
java.lang.String template,
java.lang.String emptyText,
Arg... args)
throws java.lang.IllegalArgumentException
public java.lang.String getUrl(Arg... args)
public boolean exists(java.lang.String attribute)
Assetpublic boolean exists(java.lang.String attribute,
int pos)
Assetpublic java.lang.String dump()