Package com.tacitknowledge.flip.model

Examples of com.tacitknowledge.flip.model.FeatureState


    }

    @Override
    public FeatureState getFeatureState(final String name)
    {
        FeatureState result;
        try
        {
            final FeatureDescriptor featureDescriptor = propertyManager.getFeatureDescriptor(name);
            result = featureDescriptor.process(contextManager);
        }
        catch (final FlipException ex)
        {
            logger.log(
                    Level.WARNING,
                    String.format(
                            "An exception has occured during Feature State extraction for feature named [%s]. Using [%s] value.",
                            name, FeatureState.DISABLED.toString()), ex);

            result = FeatureState.DISABLED;
        }

        if (isFeatureHasParent(name))
        {
            final FeatureState parentResult = getFeatureState(getParentFeatureName(name));
            result = FeatureState.getByState(parentResult.state() && result.state());
        }

        return result;
    }
View Full Code Here


                return null;
            }

            try
            {
                final FeatureState state = FeatureState.valueOf(value[0].toUpperCase());

                final FeatureDescriptor featureDescriptor = new FeatureDescriptor();
                featureDescriptor.setName(key.replaceFirst("^" + Pattern.quote(requestParameterPrefix), ""));
                featureDescriptor.setState(state);
                return featureDescriptor;
View Full Code Here

TOP

Related Classes of com.tacitknowledge.flip.model.FeatureState

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.