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.
 atg.svc.repository.beans.Option.Level getDefaultLevel(atg.svc.repository.beans.Option pOption)
          Returns Option.Level.DEFAULT - useful in JSP to compare against getLevel(Option)
 atg.svc.repository.beans.Option.Level getGlobalLevel(atg.svc.repository.beans.Option pOption)
          Returns Option.Level.GLOBAL - useful in JSP to compare against getLevel(Option)
 atg.svc.repository.beans.Option.Level getLevel(atg.svc.repository.beans.Option pOption)
          Gets the option level - either default, global, site or siteSegment.
 atg.svc.repository.beans.Option.Level getSelfServiceSiteLevel(atg.svc.repository.beans.Option pOption)
          Returns Option.Level.SELF_SERVICE_SITE - useful in JSP to compare against getLevel(Option)
protected  FrameworkServiceFactory getServiceFactory()
          Returns a ServiceFactory which provides non-nucleus components with a means to access the repository service nucleus components (e.g.
 atg.svc.repository.beans.Option.Level getSiteSegmentLevel(atg.svc.repository.beans.Option pOption)
          Returns Option.Level.SITE_SEGMENT - useful in JSP to compare against getLevel(Option)
 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 FrameworkServiceFactory 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.

getLevel

public atg.svc.repository.beans.Option.Level getLevel(atg.svc.repository.beans.Option pOption)
Gets the option level - either default, global, site or siteSegment. The level is helpful in the Service Admin to highlight when a value has been overridden by a higher level setting.

Parameters:
pOption - The option to get the value from.
Returns:
The String value of the option.
See Also:
Option.Level

getSiteSegmentLevel

public atg.svc.repository.beans.Option.Level getSiteSegmentLevel(atg.svc.repository.beans.Option pOption)
Returns Option.Level.SITE_SEGMENT - useful in JSP to compare against getLevel(Option)


getSelfServiceSiteLevel

public atg.svc.repository.beans.Option.Level getSelfServiceSiteLevel(atg.svc.repository.beans.Option pOption)
Returns Option.Level.SELF_SERVICE_SITE - useful in JSP to compare against getLevel(Option)


getGlobalLevel

public atg.svc.repository.beans.Option.Level getGlobalLevel(atg.svc.repository.beans.Option pOption)
Returns Option.Level.GLOBAL - useful in JSP to compare against getLevel(Option)


getDefaultLevel

public atg.svc.repository.beans.Option.Level getDefaultLevel(atg.svc.repository.beans.Option pOption)
Returns Option.Level.DEFAULT - useful in JSP to compare against getLevel(Option)


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.