Gets runtime properties.

@param embeddedContainerActive the embedded container active
@return the runtime properties
550192
public static Map<String, Object> getRuntimeProperties(final Boolean embeddedContainerActive) {
        val properties = new HashMap<String, Object>();
        properties.put(EMBEDDED_CONTAINER_CONFIG_ACTIVE, embeddedContainerActive);
        return properties;
    }
1304166
public Map<String, EmbeddableType> getEmbeddables(Class clazz)
    {
        Map<String, EmbeddableType> embeddableAttibutes = new HashMap<String, EmbeddableType>();

        if (entityTypes != null)
        {
            EntityType entity = entityTypes.get(clazz);
            Iterator<Attribute> iter = entity.getAttributes().iterator();
            while (iter.hasNext())
            {
                Attribute attribute = iter.next();
                if (isEmbeddable(((AbstractAttribute) attribute).getBindableJavaType()))
                {
                    embeddableAttibutes.put(attribute.getName(),
                            embeddable(((AbstractAttribute) attribute).getBindableJavaType()));
                }
            }
        }
        return embeddableAttibutes;
    }
723658
public PropertyStyle getStyle() {
        if (isDerived()) {
            return PropertyStyle.DERIVED;
        }
        if (getBean().isImmutable()) {
            return PropertyStyle.IMMUTABLE;
        }
        if (getGetStyle().length() > 0 && getSetStyle().length() > 0 && (getSetterGen().isSetterGenerated(this) || getSetStyle().equals("manual"))) {
            return PropertyStyle.READ_WRITE;
        }
        if (getGetStyle().length() > 0) {
            if (bean.isBuilderScopeVisible()) {
                return PropertyStyle.READ_ONLY_BUILDABLE;
            } else {
                return PropertyStyle.READ_ONLY;
            }
        }
        if (getSetStyle().length() > 0) {
            return PropertyStyle.WRITE_ONLY;
        }
        throw new RuntimeException("Property must have a getter or setter: " +
                getBean().getTypeRaw() + "." + getPropertyName());
    }
958140
@Override
    public Map<String, String> getContainerProperties() {
        Node props = container.getSingle("configuration");
        Map<String, String> properties = new HashMap<String, String>();

        if (props != null) {
            for (Node prop : props.get("property")) {
                properties.put(prop.getAttribute("name"), prop.getText());
            }
        }
        return properties;
    }
692894
public Properties getProperties() {
        if (System.getSecurityManager() == null)
            return System.getProperties();
        return AccessController.doPrivileged(new PrivilegedAction<Properties>() {
            @Override
            public Properties run() {
                return System.getProperties();
            }
        }, controlContext);
    }
704431
public RuntimeEnvironment build() {
        final org.kie.api.runtime.manager.RuntimeEnvironmentBuilder jbpmRuntimeEnvironmentBuilder;
        Manifest manifest = _manifestBuilder.build();
        if (manifest instanceof RemoteManifest) {
            RemoteManifest remoteManifest = (RemoteManifest)manifest;
            jbpmRuntimeEnvironmentBuilder = _runtimeEnvironmentBuilderFactory.newDefaultInMemoryBuilder();
            remoteManifest.addToEnvironment(jbpmRuntimeEnvironmentBuilder);
            // we dont' do any other building for remote usage
            return jbpmRuntimeEnvironmentBuilder.get();
        } else if (manifest instanceof ContainerManifest) {
            ContainerManifest containerManifest = (ContainerManifest)manifest;
            String baseName = containerManifest.getBaseName();
            ReleaseId releaseId = containerManifest.getReleaseId();
            String sessionName = containerManifest.getSessionName();
            if (releaseId != null) {
                if (baseName != null || sessionName != null) {
                    jbpmRuntimeEnvironmentBuilder = _runtimeEnvironmentBuilderFactory.newDefaultBuilder(releaseId, baseName, sessionName);
                } else {
                    jbpmRuntimeEnvironmentBuilder = _runtimeEnvironmentBuilderFactory.newDefaultBuilder(releaseId);
                }
                // we can't update classpath containers, so no point adding it to environment below here
                containerManifest.addToEnvironment(jbpmRuntimeEnvironmentBuilder);
            } else if (baseName != null || sessionName != null) {
                jbpmRuntimeEnvironmentBuilder = _runtimeEnvironmentBuilderFactory.newClasspathKmoduleDefaultBuilder(baseName, sessionName);
            } else {
                jbpmRuntimeEnvironmentBuilder = _runtimeEnvironmentBuilderFactory.newClasspathKmoduleDefaultBuilder();
            }
        } else {
            if (_persistent) {
                jbpmRuntimeEnvironmentBuilder = _runtimeEnvironmentBuilderFactory.newDefaultBuilder();
            } else {
                jbpmRuntimeEnvironmentBuilder = _runtimeEnvironmentBuilderFactory.newDefaultInMemoryBuilder();
            }
            if (manifest instanceof ResourcesManifest) {
                ResourcesManifest resourcesManifest = (ResourcesManifest)manifest;
                for (Resource resource : resourcesManifest.buildResources()) {
                    jbpmRuntimeEnvironmentBuilder.addAsset(resource, resource.getResourceType());
                }
            }
        }
        jbpmRuntimeEnvironmentBuilder.classLoader(getClassLoader());
        jbpmRuntimeEnvironmentBuilder.persistence(_persistent);
        // provides a noop EntityManagerFactory if no persistence
        EntityManagerFactory entityManagerFactory = _entityManagerFactoryBuilder.build();
        jbpmRuntimeEnvironmentBuilder.entityManagerFactory(entityManagerFactory);
        jbpmRuntimeEnvironmentBuilder.addEnvironmentEntry(EnvironmentName.ENTITY_MANAGER_FACTORY, entityManagerFactory);
        // provides an ootb UserGroupCallback if fallen-back to
        UserGroupCallback userGroupCallback = _userGroupCallbackBuilder.build();
        jbpmRuntimeEnvironmentBuilder.userGroupCallback(userGroupCallback);
        if (_persistent) {
            UserTransaction ut = TransactionManagerLocator.INSTANCE.getUserTransaction();
            TransactionManager tm = TransactionManagerLocator.INSTANCE.getTransactionManager();
            jbpmRuntimeEnvironmentBuilder.addEnvironmentEntry(EnvironmentName.TRANSACTION, ut);
            jbpmRuntimeEnvironmentBuilder.addEnvironmentEntry(EnvironmentName.TRANSACTION_MANAGER, tm);
        } else {
            // TODO: why, when no persistence, do we have to do all this?
            jbpmRuntimeEnvironmentBuilder.addEnvironmentEntry("IS_JTA_TRANSACTION", Boolean.FALSE);
            TaskEventSupport taskEventSupport = new TaskEventSupport();
            CommandService executor = new TaskCommandExecutorImpl(EnvironmentFactory.newEnvironment(), taskEventSupport);
            jbpmRuntimeEnvironmentBuilder.addEnvironmentEntry(TaskService.class.getName(), new CommandBasedTaskService(executor, taskEventSupport));
        }
        Properties properties = _propertiesBuilder.build();
        for (Object key : properties.keySet()) {
            String name = (String)key;
            String value = properties.getProperty(name);
            jbpmRuntimeEnvironmentBuilder.addConfiguration(name, value); // add to KieSessionConfiguration
            jbpmRuntimeEnvironmentBuilder.addEnvironmentEntry(name, value); // add to Environment (SWITCHYARD-2393)
        }
        // things that need to be done to the original RuntimeEnvironment before the jBPM RuntimeEnvironmentBuilder is built (get->init)
        /*
         * Access<SimpleRuntimeEnvironment> simpleREAccess = new FieldAccess<SimpleRuntimeEnvironment>(
         * org.jbpm.runtime.manager.impl.RuntimeEnvironmentBuilder.class, "runtimeEnvironment");
         * if (simpleREAccess.isReadable()) {
         * SimpleRuntimeEnvironment originalRE = simpleREAccess.read(jbpmRuntimeEnvironmentBuilder);
         */
        KieScanner scanner = null;
        SimpleRuntimeEnvironment originalRE = ((PatchedRuntimeEnvironmentBuilder)jbpmRuntimeEnvironmentBuilder).getRuntimeEnvironment();
        if (originalRE != null) {
            RegisterableItemsFactory originalRIF = originalRE.getRegisterableItemsFactory();
            if (originalRIF instanceof InternalRegisterableItemsFactory) {
                ExtendedRegisterableItemsFactory extendedRIF = _registerableItemsFactoryBuilder.build();
                CompoundRegisterableItemsFactory compoundRIF = new CompoundRegisterableItemsFactory((InternalRegisterableItemsFactory)originalRIF, extendedRIF);
                jbpmRuntimeEnvironmentBuilder.registerableItemsFactory(compoundRIF);
                ExtendedRegisterableItemsFactory.Env.addToEnvironment(jbpmRuntimeEnvironmentBuilder, compoundRIF);
                if (manifest instanceof ContainerManifest && originalRIF instanceof KModuleRegisterableItemsFactory) {
                    Access<KieContainer> kieContainerAccess = new FieldAccess<KieContainer>(KModuleRegisterableItemsFactory.class, "kieContainer");
                    if (kieContainerAccess.isReadable()) {
                        KieContainer kieContainer = kieContainerAccess.read(originalRIF);
                        ((ContainerManifest)manifest).setKieContainer(kieContainer);
                        if (((ContainerManifest)manifest).isScan()) {
                            scanner = _kieServices.newKieScanner(kieContainer);
                            scanner.start(((ContainerManifest)manifest).getScanInterval().longValue());
                        }
                    }
                }
            }
            Mapper mapper;
            AuditMode auditMode;
            if (_persistent) {
                mapper = new JPAMapper(entityManagerFactory);
                auditMode = AuditMode.JPA;
            } else {
                mapper = new InMemoryMapper();
                auditMode = AuditMode.NONE;
            }
            originalRE.setMapper(mapper);
            Environment environmentTemplate = originalRE.getEnvironmentTemplate();
            // set the patched LocalTaskServiceFactory
            originalRE.addToEnvironment(TaskServiceFactory.class.getName(), new PatchedLocalTaskServiceFactory(originalRE));
            // TODO: why, when no persistence, do we have to do all this?
            DeploymentDescriptor deploymentDescriptor = (DeploymentDescriptor)environmentTemplate.get("KieDeploymentDescriptor");
            if (deploymentDescriptor == null) {
                deploymentDescriptor = new DeploymentDescriptorManager().getDefaultDescriptor();
                originalRE.addToEnvironment("KieDeploymentDescriptor", deploymentDescriptor);
            }
            originalRE.addToEnvironment(manifest.getClass().getName(), manifest);
            ((DeploymentDescriptorImpl)deploymentDescriptor).setAuditMode(auditMode);
            if (scanner != null) {
                originalRE.addToEnvironment("KieScanner", scanner);
            }
        }

        /*
         * }
         */
        RuntimeEnvironment runtimeEnvironment = jbpmRuntimeEnvironmentBuilder.get();
        Environment environment = originalRE.getEnvironmentTemplate();
        // our ObjectMarshallingStrategy can be added to the Environment after the jBPM RuntimeEnvironmentBuilder is built (get->init)
        List<ObjectMarshallingStrategy> new_oms = new ArrayList<ObjectMarshallingStrategy>();
        new_oms.add(new SerializerObjectMarshallingStrategy(SerializerFactory.create(FormatType.JSON, null, true)));
        ObjectMarshallingStrategy[] old_oms = (ObjectMarshallingStrategy[])environment.get(EnvironmentName.OBJECT_MARSHALLING_STRATEGIES);
        if (old_oms != null) {
            for (int i = 0; i < old_oms.length; i++) {
                if (old_oms[i] != null) {
                    new_oms.add(old_oms[i]);
                }
            }
        }
        originalRE.addToEnvironment(EnvironmentName.OBJECT_MARSHALLING_STRATEGIES, new_oms.toArray(new ObjectMarshallingStrategy[new_oms.size()]));
        return runtimeEnvironment;
    }
504743
@SuppressWarnings("unchecked") public Map<String, Object> getCustomProperties()
   {
      return (Map<String, Object>) getCachedValue(ProjectField.CUSTOM_PROPERTIES);
   }
69059
public ValueMap getProperties() {
    if (this.properties == null) {
      this.properties = new ValueMapDecorator(new HashMap<String, Object>());
    }
    return this.properties;
  }
848959
private ImmutableSet<Class<? super T>> getImmediateRawTypes() {
    // Cast from ImmutableSet<Class<?>> to ImmutableSet<Class<? super T>>
    @SuppressWarnings({"unchecked", "rawtypes"})
    ImmutableSet<Class<? super T>> result = (ImmutableSet) getRawTypes(runtimeType);
    return result;
  }
312059
@Override
    public List<ContainerDef> getContainers() {
        List<ContainerDef> containers = new ArrayList<ContainerDef>();
        for (Node container : model.get("container")) {
            containers.add(new ContainerDefImpl(getDescriptorName(), model, container));
        }
        return containers;
    }
1327241
public static String getRuntimeProperty(String property, String defaultValue)
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "getRuntimeProperty", new Object[] {property, defaultValue});
                                           
      String runtimeProp = RuntimeInfo.getPropertyWithMsg(property, defaultValue);
                                           
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "getRuntimeProperty", runtimeProp);
      
      return runtimeProp;
   }
976451
public synchronized Iterator<String> getPropertyKeys() {
        if (properties == null) {
            properties = new HashMap<String, Serializable>();
        }
        return properties.keySet().iterator();
    }
307089
protected ValueContainer[] getKeyValues(PersistenceBroker broker, ClassDescriptor cld, Object obj) throws PersistenceBrokerException
    {
        return broker.serviceBrokerHelper().getKeyValues(cld, obj);
    }
868073
public static void getDsTableColumnProperties(final Container container) {
        final LazyQueryContainer lqc = (LazyQueryContainer) container;
        lqc.addContainerProperty(SPUILabelDefinitions.VAR_ID, Long.class, null, false, false);
        lqc.addContainerProperty(SPUILabelDefinitions.VAR_DESC, String.class, "", false, true);
        lqc.addContainerProperty(SPUILabelDefinitions.VAR_VERSION, String.class, null, false, false);
        lqc.addContainerProperty(SPUILabelDefinitions.VAR_NAME, String.class, null, false, true);
        lqc.addContainerProperty(SPUILabelDefinitions.VAR_CREATED_BY, String.class, null, false, true);
        lqc.addContainerProperty(SPUILabelDefinitions.VAR_LAST_MODIFIED_BY, String.class, null, false, true);
        lqc.addContainerProperty(SPUILabelDefinitions.VAR_CREATED_DATE, String.class, null, false, true);
        lqc.addContainerProperty(SPUILabelDefinitions.VAR_LAST_MODIFIED_DATE, String.class, null, false, true);
    }
801609
public ValueContainer[] getKeyValues(ClassDescriptor cld, Identity oid) throws PersistenceBrokerException
    {
        return getKeyValues(cld, oid, true);
    }
927100
public String getContainer(String property) {
        if (property == null) {
            return null;
        }
        if (JsonLdConsts.GRAPH.equals(property)) {
            return JsonLdConsts.SET;
        }
        if (!property.equals(JsonLdConsts.TYPE) && JsonLdUtils.isKeyword(property)) {
            return property;
        }
        final Map<String, Object> td = (Map<String, Object>) termDefinitions.get(property);
        if (td == null) {
            return null;
        }
        return (String) td.get(JsonLdConsts.CONTAINER);
    }
573909
public List<ContainerRuntimeOptionType<PortletDescriptor>> getAllContainerRuntimeOption()
   {
      List<ContainerRuntimeOptionType<PortletDescriptor>> list = new ArrayList<ContainerRuntimeOptionType<PortletDescriptor>>();
      List<Node> nodeList = model.get("container-runtime-option");
      for(Node node: nodeList)
      {
         ContainerRuntimeOptionType<PortletDescriptor>  type = new ContainerRuntimeOptionTypeImpl<PortletDescriptor>(this, "container-runtime-option", model, node);
         list.add(type);
      }
      return list;
   }