Package org.featureflags.FlagManager

Examples of org.featureflags.FlagManager.FlagState


  for (String flagString : flagsStatesArray) {
      flagString=flagString.trim();
      String[] flagStringArray = flagString.split("=");
      FeatureFlags key = manager.getFlag(flagStringArray[0]);
      if(key != null) {
    FlagState value = FlagState.valueOf(flagStringArray[1]);
    if(userName != null) {
        manager.setFlagStateForUser(userName, flagStringArray[0], value);
    } else {
        manager.setFlagStateTo(flagStringArray[0], value);
    }
View Full Code Here


    @Override
    protected void doPut(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  String flagName = parseFlagName(request);
  String userName = parseUserName(request);

  FlagState newFlagState = parseFlagState(request);

  Result result = null;
  if (userName != null) {
      result = flagManager.setFlagStateForUserToAndPersist(userName, flagName, newFlagState);
  } else {
View Full Code Here

  return AcceptedFormat.valueOf(formatString);
    }

    private FlagState parseFlagState(HttpServletRequest request) throws IOException {
  String flagNewStateString = Utils.readerToString(request.getReader());
  FlagState newFlagState = FlagState.valueOf(flagNewStateString);
  return newFlagState;
    }
View Full Code Here

TOP

Related Classes of org.featureflags.FlagManager.FlagState

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.