org.glassfish.config.support
Class TranslatedConfigView

java.lang.Object
  extended by org.glassfish.config.support.TranslatedConfigView
All Implemented Interfaces:
InvocationHandler, org.jvnet.hk2.config.ConfigView

public class TranslatedConfigView
extends Object
implements org.jvnet.hk2.config.ConfigView

View that translate configured attributes containing properties like ${foo.bar} into system properties values.

Author:
Jerome Dochez

Method Summary
static String getAlias(String propName)
          check if a given property name matches AS alias pattern ${ALIAS=aliasname}.
 org.jvnet.hk2.config.ConfigView getMasterView()
           
<T extends org.jvnet.hk2.config.ConfigBeanProxy>
T
getProxy(Class<T> proxyType)
           
<T extends org.jvnet.hk2.config.ConfigBeanProxy>
Class<T>
getProxyType()
           
static String getRealPasswordFromAlias(MasterPassword masterPasswordHelper, String at)
           
static Object getTranslatedValue(Object value)
           
 Object invoke(Object proxy, Method method, Object[] args)
           
static void setHabitat(org.jvnet.hk2.component.Habitat h)
           
 void setMasterView(org.jvnet.hk2.config.ConfigView view)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTranslatedValue

public static Object getTranslatedValue(Object value)

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Specified by:
invoke in interface InvocationHandler
Throws:
Throwable

getMasterView

public org.jvnet.hk2.config.ConfigView getMasterView()
Specified by:
getMasterView in interface org.jvnet.hk2.config.ConfigView

setMasterView

public void setMasterView(org.jvnet.hk2.config.ConfigView view)
Specified by:
setMasterView in interface org.jvnet.hk2.config.ConfigView

getProxyType

public <T extends org.jvnet.hk2.config.ConfigBeanProxy> Class<T> getProxyType()
Specified by:
getProxyType in interface org.jvnet.hk2.config.ConfigView

getProxy

public <T extends org.jvnet.hk2.config.ConfigBeanProxy> T getProxy(Class<T> proxyType)
Specified by:
getProxy in interface org.jvnet.hk2.config.ConfigView

setHabitat

public static void setHabitat(org.jvnet.hk2.component.Habitat h)

getAlias

public static String getAlias(String propName)
check if a given property name matches AS alias pattern ${ALIAS=aliasname}. if so, return the aliasname, otherwise return null.

Parameters:
propName - The property name to resolve. ex. ${ALIAS=aliasname}.
Returns:
The aliasname or null.

getRealPasswordFromAlias

public static String getRealPasswordFromAlias(MasterPassword masterPasswordHelper,
                                              String at)
                                       throws KeyStoreException,
                                              CertificateException,
                                              IOException,
                                              NoSuchAlgorithmException,
                                              UnrecoverableKeyException
Throws:
KeyStoreException
CertificateException
IOException
NoSuchAlgorithmException
UnrecoverableKeyException


Copyright © 2012 GlassFish Community. All Rights Reserved.