atg.svc.repository.beans.methods
Class OptionMethods

java.lang.Object
  extended by atg.svc.repository.beans.methods.OptionMethods

public class OptionMethods
extends java.lang.Object

Defines extension methods for the Option super-types.


Field Summary
static java.lang.String CLASS_VERSION
           
 
Constructor Summary
OptionMethods()
           
 
Method Summary
 java.lang.String[] getArrayValue(atg.svc.repository.beans.Option pOption)
          Gets the value of the site option as an array of Strings.
protected  ServiceFactory getServiceFactory()
          Returns a ServiceFactory which provides non-nucleus components with a means to access the repository service nucleus components (e.g.
 java.lang.String getValue(atg.svc.repository.beans.Option pOption)
          Gets the value of the option.
 void setArrayValue(java.lang.String[] pValue, atg.svc.repository.beans.Option pOption)
          Set the value of the site option as an array of Strings.
 void setValue(java.lang.String pValue, atg.svc.repository.beans.Option pOption)
          Sets the override for the default value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
See Also:
Constant Field Values
Constructor Detail

OptionMethods

public OptionMethods()
Method Detail

getServiceFactory

protected ServiceFactory getServiceFactory()
Returns a ServiceFactory which provides non-nucleus components with a means to access the repository service nucleus components (e.g. getSolutionService(), etc). This method should be defined in all Servie XXXMethods classes so it can be overridden in the versioned XXXMethods class. This provides a way to retrieve either the non-versioned or versioned service depending on whether the XXXMethods class is for a non-versioned or versioned ServiceRepository item.

Returns:
Returns an instance of ServiceFactory resolved by nucleus component reference to retrieve either the non-versioned or versioned repository service classes.

getArrayValue

public java.lang.String[] getArrayValue(atg.svc.repository.beans.Option pOption)
Gets the value of the site option as an array of Strings. The array of values is encoded in the raw value string and gets decoded into an array of String.

Parameters:
pOption - The site option to get the values from.
Returns:
The array of Strings decoded from the option value.

setArrayValue

public void setArrayValue(java.lang.String[] pValue,
                          atg.svc.repository.beans.Option pOption)
Set the value of the site option as an array of Strings. The array of values are encoded into a delimited string value and set on the site option.

Parameters:
pValue - The array of String values to set on the site option.
pOption - The site option to set the value on.

getValue

public java.lang.String getValue(atg.svc.repository.beans.Option pOption)
Gets the value of the option. If the saved value is null the default value is returned.

Parameters:
pOption - The option to get the value from.
Returns:
The String value of the option.

setValue

public void setValue(java.lang.String pValue,
                     atg.svc.repository.beans.Option pOption)
Sets the override for the default value.

Parameters:
pOption - The option to set the value on.