class FeaturesCreatorActor {

    public void createMessageByFile(final CreateMessageWrapper wrapper)
            throws FeatureCreationException {
        try {
            File file = new File(wrapper.getObservedDirectory() + File.separator + wrapper.getFileName());
            if (file.exists() && !file.isDirectory()) {
                if (file.getName().endsWith(".zip")) {
                    wrapper.setJsonFeaturesDescription(createJsonFeatureDescriptionByZip(file, wrapper.getObservedDirectory()));
                    wrapper.setJsonRepositoriesDescription(new ArrayList<IObject>());
                }
                if (file.getName().endsWith(".json")) {
                    wrapper.setJsonFeaturesDescription(getDescription(file, this.featuresFN));
                    wrapper.setJsonRepositoriesDescription(getDescription(file, this.repositoriesFN));
                }
            }
        } catch (ReadValueException | ChangeValueException e) {
            throw new FeatureCreationException("Could not create features by given file.", e);
        }
    }

    public  FeaturesCreatorActor();

}