ch.qos.logback.core.property
Class ResourceExistsPropertyDefiner

java.lang.Object
  extended by ch.qos.logback.core.spi.ContextAwareBase
      extended by ch.qos.logback.core.PropertyDefinerBase
          extended by ch.qos.logback.core.property.ResourceExistsPropertyDefiner
All Implemented Interfaces:
ContextAware, PropertyDefiner

public class ResourceExistsPropertyDefiner
extends PropertyDefinerBase

In conjunction with PropertyAction sets the named variable to "true" if the resource specified by the user is available on the class path, "false" otherwise.

Since:
1.1.0
Author:
XuHuisheng, Ceki Gulcu
See Also:
getPropertyValue()

Field Summary
 
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
 
Constructor Summary
ResourceExistsPropertyDefiner()
           
 
Method Summary
 String getPropertyValue()
          Returns the string "true" if the resource specified by the user is available on the class path, "false" otherwise.
 String getResource()
           
 void setResource(String resource)
          The resource to search for on the class path.
 
Methods inherited from class ch.qos.logback.core.PropertyDefinerBase
booleanAsStr
 
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ch.qos.logback.core.spi.ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
 

Constructor Detail

ResourceExistsPropertyDefiner

public ResourceExistsPropertyDefiner()
Method Detail

getResource

public String getResource()

setResource

public void setResource(String resource)
The resource to search for on the class path.

Parameters:
resource -

getPropertyValue

public String getPropertyValue()
Returns the string "true" if the resource specified by the user is available on the class path, "false" otherwise.

Returns:
"true"|"false" depending on the availability of resource on the classpath


Copyright © 2005-2013 QOS.ch. All Rights Reserved.