Examples of ScopeMetaData


Examples of org.jboss.beans.metadata.spi.policy.ScopeMetaData

   }

   public void testScope() throws Throwable
   {
      PolicyMetaData policy = unmarshal("Scope.xml", AbstractPolicyMetaData.class);
      ScopeMetaData scope = policy.getScope();
      assertNull(scope.getLevel());
      assertNull(scope.getQualifier());
   }
View Full Code Here

Examples of org.jboss.beans.metadata.spi.policy.ScopeMetaData

   }

   public void testScopeWithLevel() throws Throwable
   {
      PolicyMetaData policy = unmarshal("ScopeWithLevel.xml", AbstractPolicyMetaData.class);
      ScopeMetaData scope = policy.getScope();
      assertNotNull(scope.getLevel());
      assertEquals("DefaultLevel", scope.getLevel());
      assertNull(scope.getQualifier());
   }
View Full Code Here

Examples of org.jboss.beans.metadata.spi.policy.ScopeMetaData

   }

   public void testScopeWithQualifier() throws Throwable
   {
      PolicyMetaData policy = unmarshal("ScopeWithQualifier.xml", AbstractPolicyMetaData.class);
      ScopeMetaData scope = policy.getScope();
      assertNull(scope.getLevel());
      assertNotNull(scope.getQualifier());
      assertEquals("SimpleQualifier", scope.getQualifier());
   }
View Full Code Here

Examples of org.jboss.beans.metadata.spi.policy.ScopeMetaData

   }

   public void testScope() throws Throwable
   {
      PolicyMetaData policy = unmarshalPolicy();
      ScopeMetaData scope = policy.getScope();
      assertNull(scope.getLevel());
      assertNull(scope.getQualifier());
   }
View Full Code Here

Examples of org.jboss.beans.metadata.spi.policy.ScopeMetaData

   }

   public void testScopeWithLevel() throws Throwable
   {
      PolicyMetaData policy = unmarshalPolicy();
      ScopeMetaData scope = policy.getScope();
      assertNotNull(scope.getLevel());
      assertEquals("DefaultLevel", scope.getLevel());
      assertNull(scope.getQualifier());
   }
View Full Code Here

Examples of org.jboss.beans.metadata.spi.policy.ScopeMetaData

   }

   public void testScopeWithQualifier() throws Throwable
   {
      PolicyMetaData policy = unmarshalPolicy();
      ScopeMetaData scope = policy.getScope();
      assertNull(scope.getLevel());
      assertNotNull(scope.getQualifier());
      assertEquals("SimpleQualifier", scope.getQualifier());
   }
View Full Code Here

Examples of org.lightadmin.core.config.domain.scope.ScopeMetadata

    public ResponseEntity<?> countItems(DomainTypeAdministrationConfiguration domainTypeAdministrationConfiguration, RootResourceInformation repoRequest, WebRequest request, @PathVariable String scopeName) {
        DynamicRepositoryInvoker repositoryInvoker = (DynamicRepositoryInvoker) repoRequest.getInvoker();

        PersistentEntity<?, ?> persistentEntity = repoRequest.getPersistentEntity();

        final ScopeMetadata scope = domainTypeAdministrationConfiguration.getScopes().getScope(scopeName);

        final Specification filterSpecification = specificationFromRequest(request, persistentEntity);

        if (isPredicateScope(scope)) {
            final PredicateScopeMetadata predicateScope = (PredicateScopeMetadata) scope;
View Full Code Here

Examples of org.lightadmin.core.config.domain.scope.ScopeMetadata

    @RequestMapping(value = BASE_MAPPING + "/search", method = GET)
    public ResponseEntity<?> filterEntities(DomainTypeAdministrationConfiguration domainTypeAdministrationConfiguration, RootResourceInformation repoRequest, PersistentEntityResourceAssembler assembler, WebRequest request, Pageable pageable, @PathVariable String scopeName) throws Exception {
        DynamicRepositoryInvoker repositoryInvoker = (DynamicRepositoryInvoker) repoRequest.getInvoker();
        PersistentEntity<?, ?> persistentEntity = repoRequest.getPersistentEntity();

        final ScopeMetadata scope = domainTypeAdministrationConfiguration.getScopes().getScope(scopeName);

        final Specification filterSpecification = specificationFromRequest(request, persistentEntity);

        if (isPredicateScope(scope)) {
            final PredicateScopeMetadata predicateScope = (PredicateScopeMetadata) scope;
View Full Code Here

Examples of org.springframework.context.annotation.ScopeMetadata

     *
     * @param beanDef the component bean definition to resolve
     * @return the scope meta data for the given bean definition.
     */
    public ScopeMetadata resolveScopeMetadata(BeanDefinition beanDef) {
        ScopeMetadata sm = new ScopeMetadata();

        try {
            Class beanClass = ClickUtils.classForName(beanDef.getBeanClassName());

            if (Page.class.isAssignableFrom(beanClass)) {
                sm.setScopeName(ConfigurableBeanFactory.SCOPE_PROTOTYPE);

            } else {
                // TODO: see whether we can determine the default scope definition
                // from the beanDef and return this instead.
                sm.setScopeName(ConfigurableBeanFactory.SCOPE_SINGLETON);
            }

            return sm;

        } catch (Exception e) {
View Full Code Here

Examples of org.springframework.context.annotation.ScopeMetadata

    String name = beanNameGenerator.generateBeanName(definition, registry);
    BeanDefinitionHolder definitionHolder = new BeanDefinitionHolder(definition, name);

    VRaptorScopeResolver scopeResolver = new VRaptorScopeResolver();
    ScopeMetadata scopeMetadata = scopeResolver.resolveScopeMetadata(definition);
    definitionHolder = applyScopeOn(registry, definitionHolder, scopeMetadata);

    BeanDefinitionReaderUtils.registerBeanDefinition(definitionHolder, registry);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.