JDeveloper SCM API

oracle.ide.scm
Class SCMOptions

java.lang.Object
  |
  +--oracle.ide.scm.SCMOptions

public final class SCMOptions
extends java.lang.Object

Objects of this class are used by SCMOptionsCustomizers to store information relevant to the options that were selected in the source control dialogs. The underlying data structure is a map of maps; values are keyed against client-specified option names, and in turn this is keyed against the associated file.


Constructor Summary
SCMOptions()
          Create a new, initially empty SCMOptions object.
 
Method Summary
 java.lang.Object getGeneralOption(java.lang.Object key)
          Gets a general option value, not keyed against a file.
 java.lang.Object getOption(SCMFile file, java.lang.String key)
          Gets an option that applies to a single SCMFile.
 SCMOptions mergeWith(SCMOptions other)
          Merge the contents of this options object with another, returning the combined result.
 void setDefaultOption(java.lang.String key, java.lang.Object value)
          Sets a default option.
 void setGeneralOption(java.lang.Object key, java.lang.Object value)
          Sets a general option value, not keyed against a file.
 void setOption(SCMFile file, java.lang.String key, java.lang.Object value)
          Sets an option that applies to a single file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SCMOptions

public SCMOptions()
Create a new, initially empty SCMOptions object.
Method Detail

setDefaultOption

public void setDefaultOption(java.lang.String key,
                             java.lang.Object value)
Sets a default option. The default option is returned for unrecognized files.
Parameters:
key - the key
value - the default value

setOption

public void setOption(SCMFile file,
                      java.lang.String key,
                      java.lang.Object value)
Sets an option that applies to a single file.
Parameters:
file - the file that the option applies to. This must not be null.
key - the key for the file option. This must not be null. It is case sensitive. If a key already exists with this name for this file, it will be overwritten.
value - the value to store. This may be null.

setGeneralOption

public void setGeneralOption(java.lang.Object key,
                             java.lang.Object value)
Sets a general option value, not keyed against a file.
Parameters:
key - the key for the option. This must not be null. It is case sensitive. If a key already exists with this name for this file, it will be overwritten.
value - the value to store. This may be null.

getOption

public java.lang.Object getOption(SCMFile file,
                                  java.lang.String key)
Gets an option that applies to a single SCMFile.
Parameters:
file - the file to look up. This must not be null.
key - the key to look up in the list of options for file. This must not be null and is case sensitive.
Returns:
the value of the specified option for the specified file, or null if the option doesn't exist, the file doesn't exist, or the option has been set to null.

getGeneralOption

public java.lang.Object getGeneralOption(java.lang.Object key)
Gets a general option value, not keyed against a file.
Parameters:
key - the key to look up in the list of options. This must not be null and is case sensitive.

mergeWith

public SCMOptions mergeWith(SCMOptions other)
Merge the contents of this options object with another, returning the combined result.
Parameters:
other - the options to merge with this.
Returns:
an options object containing the merge result.

Copyright © 2002 Oracle Corporation