Package com.attivio.service
Class ServicePropertySetter
- java.lang.Object
-
- com.attivio.service.ServicePropertySetter
-
public class ServicePropertySetter extends java.lang.Object
This class uses bean utilities to detect the setting of properties on client services. These settings are captured and reapplied whenever client services have to be recreated.
-
-
Constructor Summary
Constructors Constructor Description ServicePropertySetter(java.lang.Class<?> clazz)
Constructs a ServicePropertySetter that can apply settings for classclazz
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyProperties(java.lang.Object target)
Applies any property settings saved bycheckInvocation(Method, Object[])
to thetarget
.void
checkInvocation(java.lang.reflect.Method m, java.lang.Object[] args)
Checks the invocation methodm
to see if it represents a writable property.
-
-
-
Method Detail
-
applyProperties
public void applyProperties(java.lang.Object target) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException
Applies any property settings saved bycheckInvocation(Method, Object[])
to thetarget
.- Parameters:
target
-- Throws:
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
java.lang.reflect.InvocationTargetException
-
checkInvocation
public void checkInvocation(java.lang.reflect.Method m, java.lang.Object[] args)
Checks the invocation methodm
to see if it represents a writable property. If so, a mapping of this property to theargs
is saved. WhenapplyProperties(Object)
is later called, any such saved mappings are applied to the target object in the order setters were called. Only the latest value for a property is saved.- Parameters:
m
-args
-
-
-