org.apache.subversion.javahl
Interface ISVNConfig.Category

Enclosing interface:
ISVNConfig

public static interface ISVNConfig.Category

Interface for reading and modifying configuration categories. Returned by ISVNConfig.config() and ISVNConfig.servers().


Method Summary
 void enumerate(String section, ISVNConfig.Enumerator handler)
          Call handler once for each option in the configuration category.
 boolean get(String section, String option, boolean defaultValue)
          Returns the boolean value of a configuration option.
 long get(String section, String option, long defaultValue)
          Returns the long integer value of a configuration option.
 String get(String section, String option, String defaultValue)
          Returns the value of a configuration option.
 Tristate get(String section, String option, String unknown, Tristate defaultValue)
          Returns the Tristate value of a configuration option.
 String getYesNoAsk(String section, String option, String defaultValue)
          Check that the configuration option's value is true, false or "ask".
 Iterable<String> sections()
           
 void set(String section, String option, boolean value)
          Set the value of a configuration option to represent a boolean.
 void set(String section, String option, long value)
          Set the value of a configuration option to represent a long integer.
 void set(String section, String option, String value)
          Set the value of a configuration option.
 

Method Detail

get

String get(String section,
           String option,
           String defaultValue)
Returns the value of a configuration option.

Parameters:
section - The section name
option - The option name
defaultValue - Return this if the option was not found.

get

boolean get(String section,
            String option,
            boolean defaultValue)
            throws ClientException
Returns the boolean value of a configuration option. The recognized representations are 'true'/'false', 'yes'/'no', 'on'/'off', '1'/'0'; case does not matter.

Throws:
ClientException - if the value cannot be parsed.
See Also:
get(String,String,String)

get

long get(String section,
         String option,
         long defaultValue)
         throws ClientException
Returns the long integer value of a configuration option.

Throws:
ClientException
See Also:
get(String,String,boolean)

get

Tristate get(String section,
             String option,
             String unknown,
             Tristate defaultValue)
             throws ClientException
Returns the Tristate value of a configuration option.

Parameters:
unknown - The value used for Tristate.Unknown.
Throws:
ClientException
See Also:
get(String,String,boolean)

getYesNoAsk

String getYesNoAsk(String section,
                   String option,
                   String defaultValue)
                   throws ClientException
Check that the configuration option's value is true, false or "ask". The boolean representations are the same as those understood by get(String,String,boolean). If the option is not found, the default value will be parsed instead.

Returns:
ISVNConfig.TRUE, ISVNConfig.FALSE or ISVNConfig.ASK
Throws:
ClientException - if the either the value or the default cannot be parsed.

set

void set(String section,
         String option,
         String value)
Set the value of a configuration option.

Parameters:
section - The section name
option - The option name
value - The value to set the option to; passing null will delete the option.

set

void set(String section,
         String option,
         boolean value)
Set the value of a configuration option to represent a boolean.

See Also:
set(String,String,String)

set

void set(String section,
         String option,
         long value)
Set the value of a configuration option to represent a long integer.

See Also:
set(String,String,String)

sections

Iterable<String> sections()
Returns:
the names of all the sections in the configuration category.

enumerate

void enumerate(String section,
               ISVNConfig.Enumerator handler)
Call handler once for each option in the configuration category.