----- private methods -----
192159
private String getSourceMultiplicity(final Cardinality cardinality) {

		switch (cardinality) {

			case OneToOne:
			case OneToMany:
				return "1";

			case ManyToOne:
			case ManyToMany:
				return "*";
		}

		return null;
	}
433421
public void init(String resource, Map<String, String> properties) {

        init(resource, properties, -1, null);
    }
935111
@Override
    public void readFromObject(Object object) {
        try {
            Method method = BeanUtils.getReadMethod(object.getClass(), getName());
            if (method != null) {
                Object value = method.invoke(object);
                initializeValue(value); // avoid updating parent or firing property change
                if (value != null) {
                    for (Property subProperty : subProperties) {
                        subProperty.readFromObject(value);
                    }
                }
            }
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        } catch (IllegalArgumentException e) {
            throw new RuntimeException(e);
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e);
        }
    }
283920
public void init(Digits annotation, PropertyMetadata propertyMetadata)
    {
        m_integerDigits = (annotation.integerDigits()==null)?-1:Integer.parseInt(annotation.integerDigits());
        m_fractionalDigits = (annotation.fractionalDigits()==null)?-1:Integer.parseInt(annotation.fractionalDigits());
        m_propertyMetadata = propertyMetadata;
        m_message = annotation.message();
    }
1325327
@Override
    public void blueprintEvent(BlueprintEvent event) {
        states.put(event.getBundle().getBundleId(), BlueprintState.values()[event.getType()]);
    }
476944
@Override
	public void onQuery() {

		final App app = StructrApp.getInstance();
		try (final Tx tx = app.tx()) {

			final Map<String, SharedNodeInterface> nodes = new LinkedHashMap<>();
			for (final SharedNodeInterface node : app.nodeQuery(SharedNodeInterface.class).getAsList()) {
				nodes.put(node.getUuid(), node);
			}

			if (nodes.size() != repository.objectCount()) {

				logger.info("Rebuilding list of shared objects: {} vs. {}", new Object[] { nodes.size(), repository.objectCount() } );

				repository.clear();

				for (final SharedNodeInterface node : nodes.values()) {
					addObjectToRepository(node);
				}
			}

			tx.success();

		} catch (FrameworkException fex) {

			logger.warn("", fex);
		}
	}
1113251
public void setPrivateSkillIds(java.util.Collection<String> privateSkillIds) {
        if (privateSkillIds == null) {
            this.privateSkillIds = null;
            return;
        }

        this.privateSkillIds = new java.util.ArrayList<String>(privateSkillIds);
    }
807576
public void accumulateAnnotations(List<String> annotations, AnnotationsAttribute annatt)
    {
        if (null == annatt)
        {
            return;
        }
        for (Annotation ann : annatt.getAnnotations())
        {
            annotations.add(ann.getTypeName());
        }
    }
202374
@Override
    public void execute() {
        if ((str == null || str.isEmpty()) && !FindContext.isAvailable()) {
            try {
                str = editor.readLine("Find previous:");
                editor.findPrevious(str);
                FindContext.setLastSearch(str);
            } catch (IOException e) {
                //noop
            }
        } else if (FindContext.isAvailable()) {
            editor.findPrevious(FindContext.getLastSearch());
        } else {
            editor.findPrevious(str);
            FindContext.setLastSearch(str);
        }
    }
206352
public void merge(Map<String, Object> map) {
        if (map == null) {
            throw new IllegalArgumentException("Map to merge cannot be null");
        }

        m_properties.putAll(map);
    }
929199
@Override
    public void setNonPersistentMapping(String nonPersistentMapping) throws JMSException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setNonPersistentMapping", nonPersistentMapping);

        if (nonPersistentMapping == null) {
            throw (JMSException) JmsErrorUtils.newThrowable(
                                                            JMSException.class,
                                                            "INVALID_VALUE_CWSIA0261",
                                                            new Object[] { "nonPersistentMapping", null },
                                                            tc
                            );
        }

        if (nonPersistentMapping.equals(ApiJmsConstants.MAPPING_BEST_EFFORT_NONPERSISTENT) ||
            nonPersistentMapping.equals(ApiJmsConstants.MAPPING_EXPRESS_NONPERSISTENT) ||
            nonPersistentMapping.equals(ApiJmsConstants.MAPPING_RELIABLE_NONPERSISTENT) ||
            nonPersistentMapping.equals(ApiJmsConstants.MAPPING_RELIABLE_PERSISTENT) ||
            nonPersistentMapping.equals(ApiJmsConstants.MAPPING_ASSURED_PERSISTENT) ||
            nonPersistentMapping.equals(ApiJmsConstants.MAPPING_NONE)) {
            jcaManagedConnectionFactory.setNonPersistentMapping(nonPersistentMapping);
        }
        else if (nonPersistentMapping.equals(ApiJmsConstants.MAPPING_AS_SIB_DESTINATION)) {
            jcaManagedConnectionFactory.setNonPersistentMapping(ApiJmsConstants.MAPPING_NONE);
        }
        else {
            throw (JMSException) JmsErrorUtils.newThrowable(
                                                            JMSException.class,
                                                            "INVALID_VALUE_CWSIA0261",
                                                            new Object[] { "nonPersistentMapping", nonPersistentMapping },
                                                            tc
                            );
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setNonPersistentMapping");
    }
605850
@SuppressWarnings("unchecked")
    @Override
    protected void afterHandle(final Request request, final Response response)
    {
        super.afterHandle(request, response);
        
        final ConcurrentMap<String, Object> responseAttributes = response.getAttributes();
        
        Series<Header> responseHeaders = (Series<Header>)responseAttributes.get(HeaderConstants.ATTRIBUTE_HEADERS);
        
        if(responseHeaders == null)
        {
            responseHeaders = new Series<Header>(Header.class);
            final Series<Header> putIfAbsent =
                    (Series<Header>)responseAttributes.putIfAbsent(HeaderConstants.ATTRIBUTE_HEADERS, responseHeaders);
            
            if(putIfAbsent != null)
            {
                responseHeaders = putIfAbsent;
            }
        }
        
        // Allow all origins
        responseHeaders.add("Access-Control-Allow-Origin", "*");
    }
274438
private void processPropDefaultValues() {
    getMethodsWithAnnotation(component, PropDefault.class).forEach(method -> {
      PropDefault propValidator = method.getAnnotation(PropDefault.class);

      String exposedMethodName = exposeExistingJavaMethodToJs(method);
      String propertyName = propValidator.value();
      optionsBuilder.addStatement("options.addJavaPropDefaultValue(p.$L, $S)",
          exposedMethodName,
          propertyName);
    });
  }
946595
public void marshalling(Xdr xdr) {
        super.marshalling(xdr);
        xdr.putString(_name);
        _attributes.marshalling(xdr);
    }
698840
@Override
    public void onApplicationEvent(final ProfileSelectionEvent event) {
        final HttpSession session = event.getRequest().getSession(false);

        Assert.notNull(session, "Cannot store a profile selection into a null session.");

        session.setAttribute(this.attributeName, event.getRequestedProfileKey());

        logger.trace(
                "Stored desired profile key [{}] into session (at attribute [{}]).",
                event.getRequestedProfileKey(),
                attributeName);

        final String fnameTheKeyMapsTo = this.mappings.get(event.getRequestedProfileKey());

        if (null == fnameTheKeyMapsTo) {
            logger.warn(
                    "The desired profile key {} has no mapping so will have no effect.",
                    event.getRequestedProfileKey());
        }
    }
257868
public function process()
    {
        parent::process();

        if ($this->value === null) {
            $this->path = array();
        } else {
            $this->path = $this->value;
            $this->value = end($this->path);
        }
    }
83206
@Override
	protected void unserializeFrom(RawDataBuffer in)
    {
        super.unserializeFrom(in);
        sessionId = new IntegerID(in.readInt());
        consumerId = new IntegerID(in.readInt());
        message = MessageSerializer.unserializeFrom(in, false);
        donePrefetching = in.readBoolean();
    }