{@link JpaSoftwareModuleManagement} bean.

@return a new {@link SoftwareModuleManagement}
164992
@Bean
    @ConditionalOnMissingBean
    SoftwareModuleManagement softwareModuleManagement(final EntityManager entityManager,
            final DistributionSetRepository distributionSetRepository,
            final SoftwareModuleRepository softwareModuleRepository,
            final SoftwareModuleMetadataRepository softwareModuleMetadataRepository,
            final SoftwareModuleTypeRepository softwareModuleTypeRepository,
            final NoCountPagingRepository criteriaNoCountDao, final AuditorAware<String> auditorProvider,
            final ArtifactManagement artifactManagement, final QuotaManagement quotaManagement,
            final VirtualPropertyReplacer virtualPropertyReplacer, final JpaProperties properties) {
        return new JpaSoftwareModuleManagement(entityManager, distributionSetRepository, softwareModuleRepository,
                softwareModuleMetadataRepository, softwareModuleTypeRepository, criteriaNoCountDao, auditorProvider,
                artifactManagement, quotaManagement, virtualPropertyReplacer, properties.getDatabase());
    }
645009
public static ManifestBuilder builder(ClassLoader classLoader, KnowledgeComponentImplementationModel implementationModel) {
        ManifestModel manifestModel = implementationModel != null ? implementationModel.getManifest() : null;
        return new ManifestBuilder(classLoader, manifestModel);
    }
1244800
static SimpleModule getModule(ObjectMapper mapper) {
        SimpleModule module = new SimpleModule();
        module.addDeserializer(CloudError.class, new CloudErrorDeserializer(mapper));
        return module;
    }
237305
public static SimpleModule getModule() {
        SimpleModule module = new SimpleModule();
        module.addSerializer(Headers.class, new HeadersSerializer());
        return module;
    }
1044566
@Override
    public T addAsModule(final String resourceName, final String targetPath) throws IllegalArgumentException {
        Validate.notNull(resourceName, "Resource must be specified");
        Validate.notNull(targetPath, "Target Path must be specified");

        return addAsModule(resourceName, new BasicPath(targetPath));
    }
652809
public ModuleType<ApplicationDescriptor> getOrCreateModule()
   {
      List<Node> nodeList = model.get("module");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new ModuleTypeImpl<ApplicationDescriptor>(this, "module", model, nodeList.get(0));
      }
      return createModule();
   }
95479
public function getModuleManager()
    {
        if (!$this->started) {
            throw new LogicException('Puli was not started');
        }

        if (!$this->moduleManager && $this->context instanceof ProjectContext) {
            $this->moduleManager = new ModuleManagerImpl(
                $this->context,
                $this->getJsonStorage()
            );
        }

        return $this->moduleManager;
    }
577459
protected <T> ManagedObjectFactory<T> getEJBManagedObjectFactory(BeanMetaData bmd, Class<T> klass) throws EJBConfigurationException {
        ManagedObjectFactory<T> factory = null;
        ManagedObjectService managedObjectService = getManagedObjectService();
        if (managedObjectService != null) {
            try {
                factory = managedObjectService.createEJBManagedObjectFactory(bmd._moduleMetaData, klass, bmd.j2eeName.getComponent());
                //TODO the isManaged method could be moved to the ManagedObjectService and then wouldn't need to create the factory
                if (!factory.isManaged()) {
                    factory = null;
                }
            } catch (ManagedObjectException e) {
                throw new EJBConfigurationException(e);
            }
        }

        return factory;
    }
843776
@Bean
    @ConditionalOnMissingBean
    DistributionSetManagement distributionSetManagement(final EntityManager entityManager,
            final DistributionSetRepository distributionSetRepository,
            final DistributionSetTagManagement distributionSetTagManagement, final SystemManagement systemManagement,
            final DistributionSetTypeManagement distributionSetTypeManagement, final QuotaManagement quotaManagement,
            final DistributionSetMetadataRepository distributionSetMetadataRepository,
            final TargetFilterQueryRepository targetFilterQueryRepository, final ActionRepository actionRepository,
            final NoCountPagingRepository criteriaNoCountDao, final ApplicationEventPublisher eventPublisher,
            final BusProperties bus, final TenantAware tenantAware,
            final VirtualPropertyReplacer virtualPropertyReplacer,
            final SoftwareModuleRepository softwareModuleRepository,
            final DistributionSetTagRepository distributionSetTagRepository,
            final AfterTransactionCommitExecutor afterCommit, final JpaProperties properties) {
        return new JpaDistributionSetManagement(entityManager, distributionSetRepository, distributionSetTagManagement,
                systemManagement, distributionSetTypeManagement, quotaManagement, distributionSetMetadataRepository,
                targetFilterQueryRepository, actionRepository, criteriaNoCountDao, eventPublisher, bus, tenantAware,
                virtualPropertyReplacer, softwareModuleRepository, distributionSetTagRepository, afterCommit,
                properties.getDatabase());

    }
1155750
protected static GenericBeanDefinition createModuleBeanDefinition(String className, Map<String,String> params, String role)
        throws IOException {
        ScannedGenericBeanDefinition result = getScannedBeanDefinition(className);
        result.setParentName(Module.class.getName());
        result.setScope(BeanDefinition.SCOPE_SINGLETON);
        result.setAttribute("id", role);
        result.setAttribute("name", role);
        result.setAttribute("init-method", "initModule");
        result.setEnforceInitMethod(true);
        result.setAttribute("destroy-method", "shutdownModule");
        result.setEnforceDestroyMethod(true);

        ConstructorArgumentValues cArgs = new ConstructorArgumentValues();
        cArgs.addIndexedArgumentValue(0, params,MODULE_CONSTRUCTOR_PARAM1_CLASS);
        // one server bean in context
        BeanReference serverRef = new RuntimeBeanReference(MODULE_CONSTRUCTOR_PARAM2_CLASS);
        cArgs.addIndexedArgumentValue(1, serverRef);
        cArgs.addIndexedArgumentValue(2, role,MODULE_CONSTRUCTOR_PARAM3_CLASS);
        result.setConstructorArgumentValues(cArgs);
        return result;
    }
107654
public final MngSoftware lazyGetMngSoftware() throws Exception {
    String beanName = getMngSoftwareName();
    MngSoftware mngSoftware = (MngSoftware) this.beansMap.get(beanName);
    if (mngSoftware == null) {
      mngSoftware = new MngSoftware();
      mngSoftware.setLogger(lazyGetLogger());
      this.beansMap.put(beanName, mngSoftware);
      lazyGetLogger().info(null, AFactoryAppBeans.class, beanName
        + " has been created.");
    }
    return mngSoftware;
  }
428495
public static Specification<JpaSoftwareModule> equalType(final Long type) {
        return (targetRoot, query, cb) -> cb.equal(
                targetRoot.<JpaSoftwareModuleType> get(JpaSoftwareModule_.type).get(JpaSoftwareModuleType_.id), type);
    }
266903
@Override
    protected Stream<Module> buildGuiceModules() {
        return Stream.concat(Stream.concat(
                    super.buildGuiceModules(),
                    sqlConfiguration.buildGuiceModules()),
                Stream.of(
                        new OntopMappingSQLModule(this),
                        new OntopMappingPostModule(getSettings())));
    }
161449
public Map<String, List<String>> getModuleDependencies() {

        if ((m_moduleDependencies == null) || m_moduleDependencies.isEmpty()) {
            try {
                // open the folder "/WEB-INF/packages/modules/"
                m_moduleDependencies = CmsModuleManager.buildDepsForAllModules(getModuleFolder(), true);
            } catch (CmsConfigurationException e) {
                throw new CmsRuntimeException(e.getMessageContainer());
            }
        }
        return m_moduleDependencies;
    }
62551
private JpaSoftwareModule touch(final SoftwareModule latestModule) {
        // merge base distribution set so optLockRevision gets updated and audit
        // log written because modifying metadata is modifying the base
        // distribution set itself for auditing purposes.
        final JpaSoftwareModule result = entityManager.merge((JpaSoftwareModule) latestModule);
        result.setLastModifiedAt(0L);

        return result;
    }
283205
public T addModule(final String moduleName, final String slot, final byte[] newHash) {
        final ContentItem item = createModuleItem(moduleName, slot, newHash);
        addContentModification(createContentModification(item, ModificationType.ADD, NO_CONTENT));
        return returnThis();
    }
183576
public Module toNormalModule(Map<String, Boolean> requires) {
        if (!isAutomatic()) {
            throw new IllegalArgumentException(name() + " not an automatic module");
        }
        return new NormalModule(this, requires);
    }