@ManagedOperation(description="Activate fatal level") @ManagedOperationParameters({@ManagedOperationParameter(name = "category", description = "the log4j category to set")}) public void activateFatal(String category) { LogManager.getLogger(category).setLevel(Level.FATAL); }
@ManagedOperation(description="Activate debug level") @ManagedOperationParameters({@ManagedOperationParameter(name = "category", description = "the log4j category to set")}) public void activateDebug(String category) { LogManager.getLogger(category).setLevel(Level.DEBUG); }
@ManagedOperation(description="Activate error level") @ManagedOperationParameters({@ManagedOperationParameter(name = "category", description = "the log4j category to set")}) public void activateError(String category) { LogManager.getLogger(category).setLevel(Level.ERROR); }
@ManagedOperation(description="Activate info level") @ManagedOperationParameters({@ManagedOperationParameter(name = "category", description = "the log4j category to set")}) public void activateInfo(String category) { LogManager.getLogger(category).setLevel(Level.INFO); }
@ManagedOperation(description="Activate warn level") @ManagedOperationParameters({@ManagedOperationParameter(name = "category", description = "the log4j category to set")}) public void activateWarn(String category) { LogManager.getLogger(category).setLevel(Level.WARN); }
@ManagedOperation(description="Activate info level") @ManagedOperationParameters({@ManagedOperationParameter(name = "category", description = "the log4j2 category to set")}) public void activateInfo(String category) { Configurator.setLevel(category, Level.INFO); }
@ManagedOperation(description="Activate error level") @ManagedOperationParameters({@ManagedOperationParameter(name = "category", description = "the log4j2 category to set")}) public void activateError(String category) { Configurator.setLevel(category, Level.ERROR); }
@ManagedOperation(description="Activate fatal level") @ManagedOperationParameters({@ManagedOperationParameter(name = "category", description = "the log4j2 category to set")}) public void activateFatal(String category) { Configurator.setLevel(category, Level.FATAL); }
@ManagedOperation(description="Activate debug level") @ManagedOperationParameters({@ManagedOperationParameter(name = "category", description = "the log4j2 category to set")}) public void activateDebug(String category) { Configurator.setLevel(category, Level.DEBUG); }
@ManagedOperation(description="Activate warn level") @ManagedOperationParameters({@ManagedOperationParameter(name = "category", description = "the log4j2 category to set")}) public void activateWarn(String category) { Configurator.setLevel(category, Level.WARN); }
@ManagedOperation(description="Retrieve the category log level") @ManagedOperationParameters({@ManagedOperationParameter(name = "category", description = "the log4j2 category")}) public String getLevel(String category) { return LogManager.getLogger(category).getLevel().toString(); }
@ManagedOperation(description="Retrieve the category log level") @ManagedOperationParameters({@ManagedOperationParameter(name = "category", description = "the log4j category")}) public String getLevel(String category) { return LogManager.getLogger(category).getLevel().toString(); }
/** {@inheritDoc} */ @Override @ManagedOperation(description = "Disable a feature") @ManagedOperationParameters({@ManagedOperationParameter(name = "uid", description = "Feature unique id")}) public void disable(String uid) { internalStore.disable(uid); }
@Override @ManagedOperation(description = "Test if a feature exists based on its identifier") @ManagedOperationParameters({@ManagedOperationParameter(name = "feature_UID", description = "Identifier of feature to test")}) public boolean exist(String feature_UID) { return internalStore.exist(feature_UID); }
@Override @ManagedOperation(description = "Create Feature") @ManagedOperationParameters({@ManagedOperationParameter(name = "feature_UID", description = "Identifier of feature to enable")}) public void create(Feature fp) { internalStore.create(fp); }
@Override @ManagedOperation(description = "Disable feature from its identifier") @ManagedOperationParameters({@ManagedOperationParameter(name = "feature_UID", description = "Unique Identifier of feature")}) public Feature read(String feature_UID) { return internalStore.read(feature_UID); }
@ManagedOperation(description = "加法操作") @ManagedOperationParameters({ @ManagedOperationParameter(name = "a", description = "加数"), @ManagedOperationParameter(name = "b", description = "被加数")}) public int add(int a, int b) { return a + b; }
/** * Exposition of 'enable' method * * @param featureID * target feature id */ @ManagedOperation(description = "Enable feature from its identifier") @ManagedOperationParameters({@ManagedOperationParameter(name = "featureId", description = "Identifier of feature to enable")}) public void enableFeature(String featureId) { getFf4j().enable(featureId); }
/** * Exposition of 'disable' method * * @param featureID * target feature id */ @ManagedOperation(description = "Disable feature from its identifier") @ManagedOperationParameters({@ManagedOperationParameter(name = "featureId", description = "Identifier of feature to disable")}) public void disableFeature(String featureId) { getFf4j().disable(featureId); }
/** * Exposition of 'getAuthorizations' method * * @param featureID * target feature id */ @ManagedOperation(description = "Returns feature authentication roles") @ManagedOperationParameters({@ManagedOperationParameter(name = "featureId", description = "Identifier of feature to get Roles")}) public Set<String> getPermissions(String featureId) { return getFf4j().getFeature(featureId).getPermissions(); }