railo.runtime.type.util
Class ComponentUtil

java.lang.Object
  extended by railo.runtime.type.util.ComponentUtil

public final class ComponentUtil
extends Object


Constructor Summary
ComponentUtil()
           
 
Method Summary
static ComponentAccess getActiveComponent(PageContext pc, ComponentAccess current)
           
static String getClassname(Component component)
           
static Object getClientComponentPropertiesObject(Config config, String className, ASMProperty[] properties)
           
static Object getClientComponentPropertiesObject(PageContext pc, String className, ASMProperty[] properties)
           
static long getCompileTime(PageContext pc, PageSource ps)
           
static long getCompileTime(PageContext pc, PageSource ps, long defaultValue)
           
static Class getComponentJavaAccess(PageContext pc, ComponentAccess component, RefBoolean isNew, boolean create, boolean writeLog, boolean supressWSbeforeArg)
          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, boolean includeBaseProperties)
           
static Struct getMetaData(PageContext pc, UDFPropertiesImpl udf)
           
static Page getPage(PageContext pc, PageSource ps)
           
static PageSource getPageSource(Component cfc)
           
static Property[] getProperties(Component c, boolean onlyPeristent, boolean includeBaseProperties, boolean preferBaseProperties, boolean inheritedMappedSuperClassOnly)
           
static Struct getPropertiesAsStruct(ComponentAccess ca, boolean onlyPersistent)
           
static Class getServerComponentPropertiesClass(PageContext pc, Component component)
           
static String md5(Component c)
           
static ExpressionException notFunction(Component c, Collection.Key key, Object member, int access)
           
static Component toComponent(Object obj)
           
static ComponentAccess toComponentAccess(Component comp)
           
static ComponentAccess toComponentAccess(Component comp, ComponentAccess defaultValue)
           
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)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentUtil

public ComponentUtil()
Method Detail

getComponentJavaAccess

public static Class getComponentJavaAccess(PageContext pc,
                                           ComponentAccess component,
                                           RefBoolean isNew,
                                           boolean create,
                                           boolean writeLog,
                                           boolean supressWSbeforeArg)
                                    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

getClassname

public static String getClassname(Component component)

getClientComponentPropertiesObject

public static Object getClientComponentPropertiesObject(PageContext pc,
                                                        String className,
                                                        ASMProperty[] properties)
                                                 throws PageException
Throws:
PageException

getClientComponentPropertiesObject

public static Object getClientComponentPropertiesObject(Config config,
                                                        String className,
                                                        ASMProperty[] properties)
                                                 throws PageException
Throws:
PageException

getServerComponentPropertiesClass

public static Class getServerComponentPropertiesClass(PageContext pc,
                                                      Component component)
                                               throws PageException
Throws:
PageException

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,
                                       boolean includeBaseProperties,
                                       boolean preferBaseProperties,
                                       boolean inheritedMappedSuperClassOnly)

getIDProperties

public static Property[] getIDProperties(Component c,
                                         boolean onlyPeristent,
                                         boolean includeBaseProperties)

toComponentAccess

public static ComponentAccess toComponentAccess(Component comp)
                                         throws ExpressionException
Throws:
ExpressionException

toComponentAccess

public static ComponentAccess toComponentAccess(Component comp,
                                                ComponentAccess defaultValue)

toComponent

public static Component toComponent(Object obj)
                             throws ExpressionException
Throws:
ExpressionException

getPageSource

public static PageSource getPageSource(Component cfc)

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,
                                 UDFPropertiesImpl udf)
                          throws PageException
Throws:
PageException


Copyright © 2012 Railo