railo.runtime.type.util
Class ComponentUtil
java.lang.Object
railo.runtime.type.util.ComponentUtil
public final class ComponentUtil
- extends Object
Method Summary |
static Class |
_getServerComponentPropertiesClass(Component component)
|
static ComponentAccess |
getActiveComponent(PageContext pc,
ComponentAccess current)
|
static Object |
getClientComponentPropertiesObject(Config config,
String className,
ASMProperty[] properties)
|
static long |
getCompileTime(PageContext pc,
PageSource ps)
|
static long |
getCompileTime(PageContext pc,
PageSource ps,
long defaultValue)
|
static Class |
getComponentJavaAccess(ComponentAccess component,
RefBoolean isNew,
boolean create,
boolean writeLog)
generate a ComponentJavaAccess (CJA) class from a component
a CJA is a dynamic genarted java class that has all method defined inside a component as java methods. |
static Property[] |
getIDProperties(Component c,
boolean onlyPeristent)
|
static Struct |
getMetaData(PageContext pc,
UDFProperties udf)
|
static Page |
getPage(PageContext pc,
PageSource ps)
|
static PageSource |
getPageSource(Component cfc)
|
static Property[] |
getProperties(Component c,
boolean onlyPeristent)
|
static Struct |
getPropertiesAsStruct(ComponentAccess ca,
boolean onlyPersistent)
|
static Class |
getServerComponentPropertiesClass(Component component)
|
static String |
md5(Component c)
|
static ExpressionException |
notFunction(Component c,
Collection.Key key,
Object member,
int access)
|
static ComponentAccess |
toComponentAccess(Component comp)
|
static ComponentAccess |
toComponentAccess(Component comp,
ComponentAccess defaultValue)
|
static ComponentPro |
toComponentPro(Component comp)
|
static ComponentPro |
toComponentPro(Component comp,
ComponentPro defaultValue)
|
static ComponentPro |
toComponentPro(Object obj)
|
static int |
toIntAccess(String access)
cast a strong access definition to the int type |
static int |
toIntAccess(String access,
int defaultValue)
|
static String |
toStringAccess(int access)
cast int type to string type |
static String |
toStringAccess(int access,
String defaultValue)
|
ComponentUtil
public ComponentUtil()
getComponentJavaAccess
public static Class getComponentJavaAccess(ComponentAccess component,
RefBoolean isNew,
boolean create,
boolean writeLog)
throws PageException
- generate a ComponentJavaAccess (CJA) class from a component
a CJA is a dynamic genarted java class that has all method defined inside a component as java methods.
This is used to generated server side Webservices.
- Parameters:
component
- isNew
-
- Returns:
-
- Throws:
PageException
getClientComponentPropertiesObject
public static Object getClientComponentPropertiesObject(Config config,
String className,
ASMProperty[] properties)
throws PageException
- Throws:
PageException
getServerComponentPropertiesClass
public static Class getServerComponentPropertiesClass(Component component)
throws PageException
- Throws:
PageException
_getServerComponentPropertiesClass
public static Class _getServerComponentPropertiesClass(Component component)
throws PageException,
IOException,
ClassNotFoundException
- Throws:
PageException
IOException
ClassNotFoundException
md5
public static String md5(Component c)
throws IOException,
ExpressionException
- Throws:
IOException
ExpressionException
toIntAccess
public static int toIntAccess(String access)
throws ExpressionException
- cast a strong access definition to the int type
- Parameters:
access
- access type
- Returns:
- int access type
- Throws:
ExpressionException
toIntAccess
public static int toIntAccess(String access,
int defaultValue)
toStringAccess
public static String toStringAccess(int access)
throws ExpressionException
- cast int type to string type
- Parameters:
access
-
- Returns:
- String access type
- Throws:
ExpressionException
toStringAccess
public static String toStringAccess(int access,
String defaultValue)
notFunction
public static ExpressionException notFunction(Component c,
Collection.Key key,
Object member,
int access)
getProperties
public static Property[] getProperties(Component c,
boolean onlyPeristent)
getIDProperties
public static Property[] getIDProperties(Component c,
boolean onlyPeristent)
toComponentPro
public static ComponentPro toComponentPro(Component comp)
throws ExpressionException
- Throws:
ExpressionException
toComponentAccess
public static ComponentAccess toComponentAccess(Component comp)
throws ExpressionException
- Throws:
ExpressionException
toComponentAccess
public static ComponentAccess toComponentAccess(Component comp,
ComponentAccess defaultValue)
toComponentPro
public static ComponentPro toComponentPro(Object obj)
throws ExpressionException
- Throws:
ExpressionException
getPageSource
public static PageSource getPageSource(Component cfc)
toComponentPro
public static ComponentPro toComponentPro(Component comp,
ComponentPro defaultValue)
getActiveComponent
public static ComponentAccess getActiveComponent(PageContext pc,
ComponentAccess current)
getCompileTime
public static long getCompileTime(PageContext pc,
PageSource ps,
long defaultValue)
getCompileTime
public static long getCompileTime(PageContext pc,
PageSource ps)
throws PageException
- Throws:
PageException
getPage
public static Page getPage(PageContext pc,
PageSource ps)
throws PageException
- Throws:
PageException
getPropertiesAsStruct
public static Struct getPropertiesAsStruct(ComponentAccess ca,
boolean onlyPersistent)
getMetaData
public static Struct getMetaData(PageContext pc,
UDFProperties udf)
throws PageException
- Throws:
PageException
Copyright © 2012 Railo