| | |
| | | // The subcommand requested by the user as part of the command-line arguments. |
| | | private SubCommand subCommand; |
| | | |
| | | //Indicates whether the version argument was provided. |
| | | private boolean versionPresent; |
| | | |
| | | private final static String INDENT = " "; |
| | | private final static int MAX_LENGTH = SetupUtils.isWindows() ? 79 : 80; |
| | | |
| | |
| | | // information. |
| | | try |
| | | { |
| | | versionPresent = true; |
| | | DirectoryServer.printVersion(usageOutputStream); |
| | | usageOrVersionDisplayed = true ; |
| | | } catch (Exception e) {} |
| | |
| | | // information. |
| | | try |
| | | { |
| | | versionPresent = true; |
| | | DirectoryServer.printVersion(usageOutputStream); |
| | | usageOrVersionDisplayed = true ; |
| | | } catch (Exception e) {} |
| | |
| | | if (dashVAccepted) |
| | | { |
| | | usageOrVersionDisplayed = true; |
| | | versionPresent = true; |
| | | try |
| | | { |
| | | DirectoryServer.printVersion(usageOutputStream); |
| | |
| | | if (dashVAccepted) |
| | | { |
| | | usageOrVersionDisplayed = true; |
| | | versionPresent = true; |
| | | try |
| | | { |
| | | DirectoryServer.printVersion(usageOutputStream); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * Returns whether the usage argument was provided or not. This method |
| | | * should be called after a call to parseArguments. |
| | | * @return <CODE>true</CODE> if the usage argument was provided and |
| | | * <CODE>false</CODE> otherwise. |
| | | */ |
| | | public boolean isUsageArgumentPresent() |
| | | { |
| | | boolean isUsageArgumentPresent = false; |
| | | if (usageArgument != null) |
| | | { |
| | | isUsageArgumentPresent = usageArgument.isPresent(); |
| | | } |
| | | return isUsageArgumentPresent; |
| | | } |
| | | |
| | | /** |
| | | * Returns whether the version argument was provided or not. This method |
| | | * should be called after a call to parseArguments. |
| | | * @return <CODE>true</CODE> if the version argument was provided and |
| | | * <CODE>false</CODE> otherwise. |
| | | */ |
| | | public boolean isVersionArgumentPresent() |
| | | { |
| | | boolean isPresent; |
| | | if (!super.isVersionArgumentPresent()) |
| | | { |
| | | isPresent = versionPresent; |
| | | } |
| | | else |
| | | { |
| | | isPresent = true; |
| | | } |
| | | return isPresent; |
| | | } |
| | | } |
| | | |