@Override protected String parse(List<String> arguments) throws JPBadArgumentException { return getOneArgumentResult(); } }
public JPPrefix() { super(COMMAND_IDENTIFIERS, FileHandler.ExistenceHandling.Must, FileHandler.AutoMode.Off); registerDependingProperty(JPUsrDirectory.class); }
public JPShareDirectory() { super(COMMAND_IDENTIFIERS, FileHandler.ExistenceHandling.Must, FileHandler.AutoMode.Off); registerDependingProperty(JPPrefix.class); }
@Override public void validate() throws JPValidationException { if (JPService.testMode()) { setAutoCreateMode(FileHandler.AutoMode.On); setExistenceHandling(FileHandler.ExistenceHandling.Must); } super.validate(); }
@Override public void validate() throws JPValidationException { if (JPService.testMode()) { setAutoCreateMode(FileHandler.AutoMode.On); setExistenceHandling(FileHandler.ExistenceHandling.Must); } super.validate(); }
@Override public void validate() throws JPValidationException { if (JPService.testMode()) { setAutoCreateMode(FileHandler.AutoMode.On); setExistenceHandling(FileHandler.ExistenceHandling.Must); } super.validate(); }
@Override public void validate() throws JPValidationException { if (JPService.testMode()) { setAutoCreateMode(FileHandler.AutoMode.On); setExistenceHandling(FileHandler.ExistenceHandling.Must); } super.validate(); }
@Override public void validate() throws JPValidationException { super.validate(); if (!getValueType().equals((AbstractJavaProperty.ValueType.PropertyDefault))) { logger.warn(JPService.getApplicationName() + " started in read only mode!"); } }
@Override protected LogLevel parse(List<String> arguments) throws JPServiceException { LogLevel logLevel = super.parse(arguments); getRootLogger().setLevel(Level.valueOf(logLevel.name())); return logLevel; } }
/** * @return true if JPS is in test mode or JPReset is enabled. */ @Override protected Boolean getPropertyDefaultValue() { try { return JPService.testMode() || JPService.getProperty(JPReset.class).getValue(); } catch (JPNotAvailableException ex) { addErrorReport(ex, ValueType.PropertyDefault); return null; } }
@Override protected void validate() throws JPValidationException { if(getValue()) { logger.info("Debug mode enabled!"); } }
@Override protected void validate() throws JPValidationException { if(!isIdentified() && !getValue()) { logger.info("GUI is disabled! Set "+COMMAND_IDENTIFIERS[0]+" property to display the GUI."); } }
@Override protected void validate() throws JPValidationException { if (getValue()) { logger.warn("Force mode enabled!"); } }
@Override protected void validate() throws JPValidationException { if(getValue()) { logger.info("Verbose is enabled!"); } }
@Override public String getDescription() { return getTimeDescription() + "Unit explanation: no unit means milliseconds, d is for days, h for hours, m for minutes, s for seconds, c for microseconds and n is for nanoseconds."; }
public JPVarDirectory() { super(COMMAND_IDENTIFIERS, ExistenceHandling.CanExist, FileHandler.AutoMode.Off); registerDependingProperty(JPPrefix.class); }
@Override protected Float parse(List<String> arguments) throws JPBadArgumentException { return Float.parseFloat(getOneArgumentResult()); } }
@Override protected void validate() throws JPValidationException { if(getValue()) { logger.info("Visual debug mode enabled!"); } }
public static boolean debugMode() { try { return JPService.getProperty(JPDebugMode.class).getValue(); } catch (JPServiceException ex) { printError("Could not detect DebugMode!", ex); } return false; } }
public static boolean verboseMode() { try { return JPService.getProperty(JPVerbose.class).getValue(); } catch (JPServiceException ex) { printError("Could not detect VerboseMode!", ex); } return false; }