Package org.ff4j.web.embedded
Class ConsoleOperations
java.lang.Object
org.ff4j.web.embedded.ConsoleOperations
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcreateFeature(FF4j ff4j, jakarta.servlet.http.HttpServletRequest req) User action to create a new Feature.static voidcreateProperty(FF4j ff4j, jakarta.servlet.http.HttpServletRequest req) Create new property in store.static voidexportConfiguration(FF4j ff4j, jakarta.servlet.http.HttpServletResponse res, String format) Export configuration.static voidexportFile(FF4j ff4j, jakarta.servlet.http.HttpServletResponse res) Build Http response when invoking export features.static voidimportFile(FF4j ff4j, InputStream in) Deprecated.static voidimportFile(FF4j ff4j, FF4jConfiguration config) User action to import Features from a properties files.static voidupdateFeatureDescription(FF4j ff4j, jakarta.servlet.http.HttpServletRequest req) User action to update a target feature's description.static voidupdateProperty(FF4j ff4j, jakarta.servlet.http.HttpServletRequest req) Sample Element should be updated like name, description, value
-
Method Details
-
createFeature
User action to create a new Feature.- Parameters:
req- http request containing operation parameters
-
updateProperty
Sample Element should be updated like name, description, value- Parameters:
ff4j-req-
-
createProperty
Create new property in store.- Parameters:
ff4j- current ff4j instance.req- current http request
-
updateFeatureDescription
User action to update a target feature's description.- Parameters:
req- http request containing operation parameters
-
importFile
Deprecated.Please use importFile(FF4j ff4j, FF4jConfiguration config) and get aFF4jConfigurationwith aFF4jConfigurationParser: -XmlParser: new XmlParser().parseConfigurationFile(InputStream) -YamlParser-PropertiesParser- Throws:
IOException
-
importFile
User action to import Features from a properties files.- Parameters:
in- inpustream from configuration file- Throws:
IOException- Error raised if the configuration cannot be read
-
exportConfiguration
public static void exportConfiguration(FF4j ff4j, jakarta.servlet.http.HttpServletResponse res, String format) throws IOException Export configuration.- Parameters:
ff4j- feature flags for javares- http responseformat- format- Throws:
IOException- error occured when exporting
-
exportFile
public static void exportFile(FF4j ff4j, jakarta.servlet.http.HttpServletResponse res) throws IOException Build Http response when invoking export features.- Parameters:
res- http response- Throws:
IOException- error when building response
-