Returns a dictionary where export properties have been replaced by import
    ones

    :param properties: A dictionary of service properties (with export keys)
    :return: A dictionary with import properties
501537
def to_import_properties(properties):
    # type: (dict) -> dict
    
    # Copy the given dictionary
    props = properties.copy()

    # Add the "imported" property
    props[pelix.remote.PROP_IMPORTED] = True

    # Remote service ID
    try:
        props[pelix.remote.PROP_ENDPOINT_SERVICE_ID] = props.pop(
            pelix.constants.SERVICE_ID
        )
    except KeyError:
        # No service ID
        pass

    # Replace the "export configs"
    configs = props.pop(pelix.remote.PROP_EXPORTED_CONFIGS, None)
    if configs:
        props[pelix.remote.PROP_IMPORTED_CONFIGS] = configs

    # Clear other export properties
    for key in (
        pelix.remote.PROP_EXPORTED_INTENTS,
        pelix.remote.PROP_EXPORTED_INTENTS_EXTRA,
        pelix.remote.PROP_EXPORTED_INTERFACES,
    ):
        try:
            del props[key]
        except KeyError:
            # Key wasn't there
            pass

    return props
53143
def to_dict(self):
        ''''''
        d = {'componentId': self.component_id,
                'instanceName': self.instance_name}
        props = []
        for name in self.properties:
            p = {'name': name}
            if self.properties[name]:
                p['value'] = str(self.properties[name])
            props.append(p)
        if props:
            d[RTS_EXT_NS_YAML + 'properties'] = props
        return d
649660
def export_modifications(self):
        

        result = {}

        for key, value in self.__modified_data__.items():
            try:
                result[key] = value.export_data()
            except AttributeError:
                result[key] = value

        for key, value in self.__original_data__.items():
            if key in result.keys() or key in self.__deleted_fields__:
                continue
            try:
                if not value.is_modified():
                    continue
                modifications = value.export_modifications()
            except AttributeError:
                continue

            try:
                result.update({'{}.{}'.format(key, f): v for f, v in modifications.items()})
            except AttributeError:
                result[key] = modifications

        return result
261428
def application_properties(self, key=None):
        
        params = {}
        if key is not None:
            params['key'] = key
        return self._get_json('application-properties', params=params)
1143059
def add_properties(self, properties):
        
        if isinstance(properties, dict):
            self._properties.update(properties)
784958
def export_data(self):
        
        result = {}
        data = self.__original_data__.copy()
        data.update(self.__modified_data__)
        for key, value in data.items():
            if key in self.__deleted_fields__:
                continue

            try:
                result[key] = value.export_data()
            except AttributeError:
                result[key] = value

        return result
1013977
def get_example(cls) -> dict:
        
        if cls.example is not None:
            return cls.example
        return {k: v.get_example() for k, v in cls.properties.items()}
1003197
private void processProperties() {
        state = true;
        try {
            exporterServiceFilter = getFilter(exporterServiceFilterProperty);
        } catch (InvalidFilterException invalidFilterException) {
            LOG.debug("The value of the Property " + FILTER_EXPORTERSERVICE_PROPERTY + " is invalid,"
                    + " the recuperation of the Filter has failed. The instance gonna stop.", invalidFilterException);
            state = false;
            return;
        }

        try {
            exportDeclarationFilter = getFilter(exportDeclarationFilterProperty);
        } catch (InvalidFilterException invalidFilterException) {
            LOG.debug("The value of the Property " + FILTER_EXPORTDECLARATION_PROPERTY + " is invalid,"
                    + " the recuperation of the Filter has failed. The instance gonna stop.", invalidFilterException);
            state = false;
            return;
        }
    }
714066
public void configPropertiesUpdated(Dictionary<String, String> properties)
    {
        if (HttpServiceTracker.propertiesEqual(properties, configProperties))
            return;
        configProperties = properties;
        ServiceReference reference = context.getServiceReference(HttpService.class.getName());
        if (reference == null)
            return;
        HttpService httpService = (HttpService) context.getService(reference);

        String oldAlias = this.getAlias();
        this.changeServletProperties(servlet, properties);
        String alias = properties.get(BaseWebappServlet.ALIAS);
        boolean restartRequired = false;
        if (!oldAlias.equals(alias))
            restartRequired = true;
        else if (servlet instanceof WebappServlet)
            restartRequired = ((WebappServlet)servlet).restartRequired();
        if (!restartRequired)
            return;
        try {
            httpService.unregister(oldAlias);
        } catch (Exception e) {
            e.printStackTrace();    // Should not happen
        }
        this.properties.put(BaseWebappServlet.ALIAS, alias);
        
        if (servlet instanceof WebappServlet)
            if (((WebappServlet)servlet).restartRequired())
        {
            ((WebappServlet)servlet).free();
            servlet = null;
        }

        this.addingService(reference); // Start it back up
    }
1338026
def properties(self):
        
        d = dict(self.sortinfo)
        if CVARSORT in d:
            del d[CVARSORT]
        return d
1140291
def __check_properties(props):
        # type: (dict) -> None
        
        # Mandatory properties
        mandatory = (
            pelix.remote.PROP_ENDPOINT_ID,
            pelix.remote.PROP_IMPORTED_CONFIGS,
            pelix.constants.OBJECTCLASS,
        )
        for key in mandatory:
            if key not in props:
                raise ValueError("Missing property: {0}".format(key))

        # Export/Import properties
        props_export = (
            pelix.remote.PROP_EXPORTED_CONFIGS,
            pelix.remote.PROP_EXPORTED_INTERFACES,
        )

        for key in props_export:
            if key in props:
                raise ValueError("Export property found: {0}".format(key))
528865
def old_properties_names_to_new(self):
        
        old_properties = getattr(self.__class__, "old_properties", {})
        for old_name, new_name in list(old_properties.items()):
            # Ok, if we got old_name and NO new name,
            # we switch the name
            if hasattr(self, old_name) and not hasattr(self, new_name):
                value = getattr(self, old_name)
                setattr(self, new_name, value)
                delattr(self, old_name)
1046239
def properties_changed(self, sender, changed_properties, invalidated_properties):
        
        if 'Connected' in changed_properties:
            if changed_properties['Connected']:
                self.connect_succeeded()
            else:
                self.disconnect_succeeded()

        if ('ServicesResolved' in changed_properties and changed_properties['ServicesResolved'] == 1 and
                not self.services):
            self.services_resolved()
527443
def export_dict(self):
        ""
        return {k: v.export_dict() if isinstance(v, self.__class__) else v
                for k, v in self.items()}
710180
def retrieve_from_pwb
      imported_properties = Pwb::ImportProperties.new(params[:file]).import_csv
      render json: {
        retrieved_items: imported_properties
      }
      # return render json: { "success": true }, status: :ok, head: :no_content
    end
353736
def to_dict(self):
        """"""
        dictionary = {}
        for key, value in iteritems(self.__dict__):
            property_name = key[1:]
            if hasattr(self, property_name):
                dictionary.update({property_name: getattr(self, property_name, None)})
        return dictionary
23905
def get_override_configuration(self):
        
        res = {}
        properties = self.__class__.properties
        for prop, entry in list(properties.items()):
            if entry.override:
                res[prop] = getattr(self, prop)
        return res