org.netbeans.lib.cvsclient.command.importcmd
Class ImportCommand

java.lang.Object
  extended by org.netbeans.lib.cvsclient.command.Command
      extended by org.netbeans.lib.cvsclient.command.BuildableCommand
          extended by org.netbeans.lib.cvsclient.command.importcmd.ImportCommand
All Implemented Interfaces:
java.lang.Cloneable, CVSListener

public class ImportCommand
extends BuildableCommand

The import command imports local directory structures into the repository.


Field Summary
 
Fields inherited from class org.netbeans.lib.cvsclient.command.BuildableCommand
builder
 
Fields inherited from class org.netbeans.lib.cvsclient.command.Command
localDirectory
 
Constructor Summary
ImportCommand()
           
 
Method Summary
 void addIgnoredFile(java.lang.String ignoredFileName)
          Add a file name that is to be ignored by the import.
 void addWrapper(java.lang.String filenamePattern, KeywordSubstitutionOptions keywordSubstitutionOptions)
           
 void addWrapper(StringPattern filenamePattern, KeywordSubstitutionOptions keywordSubstitutionOptions)
           
 Builder createBuilder(EventManager eventManager)
          Creates the ImportBuilder.
 void execute(ClientServices client, EventManager eventManager)
          Executes thiz command using the set options.
 java.lang.String getCVSArguments()
          Returns the arguments of the command in the command-line style.
 java.lang.String getCVSCommand()
          This method returns how the command would looklike when typed on the command line.
 java.util.List getIgnoreFiles()
          Get a list of files that are ignored by import.
 java.lang.String getImportDirectory()
           
 KeywordSubstitutionOptions getKeywordSubstitutionOptions()
          Returns the keyword substitution option.
 java.lang.String getLogMessage()
          Returns the log message.
 java.lang.String getModule()
          Returns the module (the in-repository path, where the files should be stored.
 java.lang.String getOptString()
          Returns a String that defines which options are available for this particular command.
 java.lang.String getReleaseTag()
          Returns the release tag.
 java.lang.String getVendorBranch()
          Returns the vendor branch.
 java.lang.String getVendorTag()
          Returns the vendor tag.
 java.util.Map getWrappers()
          Returns a map with all wrappers.
 boolean isUseFileModifTime()
          Tells, whether the file modification time is to be used as the time of the import.
 void resetCVSCommand()
          Resets all switches in the command to the default behaviour.
 boolean setCVSCommand(char opt, java.lang.String optArg)
          Takes the arguments and sets the command.
 void setImportDirectory(java.lang.String directory)
          Pints to directoty to import.
 void setKeywordSubstitutionOptions(KeywordSubstitutionOptions keywordSubstitutionOptions)
          Sets the keywords substitution option.
 void setLogMessage(java.lang.String logMessage)
          Sets the log message.
 void setModule(java.lang.String module)
          Sets the module (the in-repository path, where the files should be stored).
 void setReleaseTag(java.lang.String releaseTag)
          Sets the necessary release tag.
 void setUseFileModifTime(boolean useFileModifTime)
          Sets whether the file modification time is to be used as the time of the import.
 void setVendorBranch(java.lang.String vendorBranch)
          Sets the vendor branch.
 void setVendorTag(java.lang.String vendorTag)
          Sets the necessary vendor tag.
 void setWrappers(java.util.Map wrapperMap)
          Compliant method to addWrapper.
 
Methods inherited from class org.netbeans.lib.cvsclient.command.BuildableCommand
commandTerminated, isBuilderSet, messageSent, messageSent, setBuilder
 
Methods inherited from class org.netbeans.lib.cvsclient.command.Command
clone, fileAdded, fileInfoGenerated, fileRemoved, fileToRemove, fileUpdated, getDisplayName, getGlobalOptions, getLocalDirectory, getLocalPath, getRelativeToLocalPathInUnixStyle, getTrimmedString, hasFailed, moduleExpanded, setDisplayName, setLocalDirectory
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImportCommand

public ImportCommand()
Method Detail

addWrapper

public void addWrapper(java.lang.String filenamePattern,
                       KeywordSubstitutionOptions keywordSubstitutionOptions)

addWrapper

public void addWrapper(StringPattern filenamePattern,
                       KeywordSubstitutionOptions keywordSubstitutionOptions)

setWrappers

public void setWrappers(java.util.Map wrapperMap)
Compliant method to addWrapper. It replaces the whole list of cvswrappers. The Map's structure should be following: Key: instance of StringPattern(fileName wildpattern) Value: instance of KeywordSubstitutionOptions


getWrappers

public java.util.Map getWrappers()
Returns a map with all wrappers. For map descriptions see setWrapper()


getKeywordSubstitutionOptions

public KeywordSubstitutionOptions getKeywordSubstitutionOptions()
Returns the keyword substitution option.


setKeywordSubstitutionOptions

public void setKeywordSubstitutionOptions(KeywordSubstitutionOptions keywordSubstitutionOptions)
Sets the keywords substitution option.


getReleaseTag

public java.lang.String getReleaseTag()
Returns the release tag.


setReleaseTag

public void setReleaseTag(java.lang.String releaseTag)
Sets the necessary release tag.


getLogMessage

public java.lang.String getLogMessage()
Returns the log message.


setLogMessage

public void setLogMessage(java.lang.String logMessage)
Sets the log message.


getModule

public java.lang.String getModule()
Returns the module (the in-repository path, where the files should be stored.


setModule

public void setModule(java.lang.String module)
Sets the module (the in-repository path, where the files should be stored).


setImportDirectory

public void setImportDirectory(java.lang.String directory)
Pints to directoty to import.


getImportDirectory

public java.lang.String getImportDirectory()

getVendorBranch

public java.lang.String getVendorBranch()
Returns the vendor branch.


setVendorBranch

public void setVendorBranch(java.lang.String vendorBranch)
Sets the vendor branch. If null is set, the default branch 1.1.1 is used automatically.


getVendorTag

public java.lang.String getVendorTag()
Returns the vendor tag.


setVendorTag

public void setVendorTag(java.lang.String vendorTag)
Sets the necessary vendor tag.


isUseFileModifTime

public boolean isUseFileModifTime()
Tells, whether the file modification time is to be used as the time of the import.


setUseFileModifTime

public void setUseFileModifTime(boolean useFileModifTime)
Sets whether the file modification time is to be used as the time of the import.


getIgnoreFiles

public java.util.List getIgnoreFiles()
Get a list of files that are ignored by import.


addIgnoredFile

public void addIgnoredFile(java.lang.String ignoredFileName)
Add a file name that is to be ignored by the import.


execute

public void execute(ClientServices client,
                    EventManager eventManager)
             throws CommandException,
                    AuthenticationException
Executes thiz command using the set options.

Overrides:
execute in class BuildableCommand
Parameters:
client - the client services object that provides any necessary services to this command, including the ability to actually process all the requests
Throws:
CommandException - if an error occurs executing the command
AuthenticationException

getCVSCommand

public java.lang.String getCVSCommand()
Description copied from class: Command
This method returns how the command would looklike when typed on the command line. Each command is responsible for constructing this information.

Specified by:
getCVSCommand in class Command

getCVSArguments

public java.lang.String getCVSArguments()
Description copied from class: Command
Returns the arguments of the command in the command-line style. Similar to getCVSCommand() however without the files and command's name.

Specified by:
getCVSArguments in class Command

setCVSCommand

public boolean setCVSCommand(char opt,
                             java.lang.String optArg)
Description copied from class: Command
Takes the arguments and sets the command. To be mainly used for automatic settings (like parsing the .cvsrc file).

Specified by:
setCVSCommand in class Command
Returns:
true if the option (switch) was recognized and set

resetCVSCommand

public void resetCVSCommand()
Description copied from class: Command
Resets all switches in the command to the default behaviour. After calling this method, the command should behave defaultly.

Specified by:
resetCVSCommand in class Command

getOptString

public java.lang.String getOptString()
Description copied from class: Command
Returns a String that defines which options are available for this particular command.

Specified by:
getOptString in class Command

createBuilder

public Builder createBuilder(EventManager eventManager)
Creates the ImportBuilder.

Overrides:
createBuilder in class BuildableCommand

 

Built on August 7 2008.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.