class FeaturesCreatorActor {

    public void createFeaturesByMessage(final CreateFeaturesWrapper wrapper)
            throws FeatureCreationException {
        try {
            Map<String, IFeature> features = new HashMap<>();
            List<IObject> repositories = wrapper.getRepositoriesDescription();
            List<IObject> repositoryStorage = IOC.resolve(Keys.getOrAdd("feature-repositories"));

            if (null != repositories) {
                for (IObject repository : repositories) {
                    repositoryStorage.add(repository);
                }
            }
            List<IObject> featuresFromJson = wrapper.getFeaturesDescription();
            if (null != featuresFromJson) {
                for (IObject feature : featuresFromJson) {
                    String name = (String) feature.getValue(this.nameFN);
                    if (null != feature.getValue(this.groupFN)) {
                        features.put(name, new Feature(
                                        name,
                                        (String) feature.getValue(this.groupFN),
                                        (String) feature.getValue(this.versionFN),
                                        //(IPath) feature.getValue(this.featureLocationFN)
                                        new Path(wrapper.getFeatureDirectory())
                                )
                        );
                    } else {
                        features.put(name, new Feature(
                                        name,
                                        null,
                                        (IPath) feature.getValue(this.featureLocationFN)
                                        //new Path(wrapper.getFeatureDirectory())
                                )
                        );
                    }
                }
            }

            wrapper.setFeatures(features.values());
        } catch (ResolutionException | ChangeValueException | ReadValueException | InvalidArgumentException e) {
            throw new FeatureCreationException(e);
        }
    }

    public  FeaturesCreatorActor();

}