Package org.jboss.seam

Examples of org.jboss.seam.ScopeType


      {
         throw new IllegalArgumentException(
                  "must specify either method or value in <factory/> declaration for variable: "
                           + name);
      }
      ScopeType scope = scopeName == null ? ScopeType.UNSPECIFIED : ScopeType.valueOf(scopeName
               .toUpperCase());
      boolean autoCreate = Boolean.parseBoolean(factory.attributeValue("auto-create"));
      factoryDescriptors.add(new FactoryDescriptor(name, scope, method, value, autoCreate));
   }
View Full Code Here


      String scopeName = component.attributeValue("scope");
      String jndiName = component.attributeValue("jndi-name");
      String precedenceString = component.attributeValue("precedence");
      int precedence = precedenceString==null ? Install.APPLICATION : Integer.valueOf(precedenceString);
      ScopeType scope = scopeName == null ? null : ScopeType.valueOf(scopeName.toUpperCase());
      String autocreateAttribute = component.attributeValue("auto-create");
      Boolean autoCreate = autocreateAttribute==null ? null : Boolean.parseBoolean(autocreateAttribute);
      String startupAttribute = component.attributeValue("startup");
      Boolean startup = startupAttribute==null ? null : Boolean.parseBoolean(startupAttribute);
      String startupDependsAttribute = component.attributeValue("startupDepends");
View Full Code Here

                  for ( String name: init.getHotDeployableComponents() )
                  {
                     Component component = Component.forName(name);
                     if (component!=null)
                     {
                        ScopeType scope = component.getScope();
                        if ( scope!=ScopeType.STATELESS && scope.isContextActive() )
                        {
                           scope.getContext().remove(name);
                        }
                        init.removeObserverMethods(component);
                     }
                     Contexts.getApplicationContext().remove(name + COMPONENT_SUFFIX);
                  }
View Full Code Here

      }
   }

   private void installRole(Class<?> scannedClass, Role role)
   {
      ScopeType scope = Seam.getComponentRoleScope(scannedClass, role);
      addComponentDescriptor( new ComponentDescriptor( role.name(), scannedClass, scope ) );
   }
View Full Code Here

      {
         throw new IllegalArgumentException(
                  "must specify either method or value in <factory/> declaration for variable: "
                           + name);
      }
      ScopeType scope = scopeName == null ? ScopeType.UNSPECIFIED : ScopeType.valueOf(scopeName
               .toUpperCase());
      boolean autoCreate = "true".equals(factory.attributeValue("auto-create"));
      factoryDescriptors.add(new FactoryDescriptor(name, scope, method, value, autoCreate));
   }
View Full Code Here

      String scopeName = component.attributeValue("scope");
      String jndiName = component.attributeValue("jndi-name");
      String precedenceString = component.attributeValue("precedence");
      int precedence = precedenceString==null ? Install.APPLICATION : Integer.valueOf(precedenceString);
      ScopeType scope = scopeName == null ? null : ScopeType.valueOf(scopeName.toUpperCase());
      String autocreateAttribute = component.attributeValue("auto-create");
      Boolean autoCreate = autocreateAttribute==null ? null : "true".equals(autocreateAttribute);
      String startupAttribute = component.attributeValue("startup");
      Boolean startup = startupAttribute==null ? null : "true".equals(startupAttribute);
      String startupDependsAttribute = component.attributeValue("startupDepends");
View Full Code Here

                  for ( String name: init.getHotDeployableComponents() )
                  {
                     Component component = Component.forName(name);
                     if (component!=null)
                     {
                        ScopeType scope = component.getScope();
                        if ( scope!=ScopeType.STATELESS && scope.isContextActive() )
                        {
                           scope.getContext().remove(name);
                        }
                        init.removeObserverMethods(component);
                     }
                     Contexts.getApplicationContext().remove(name + COMPONENT_SUFFIX);
                  }
View Full Code Here

      }
   }

   private void installRole(Class<Object> scannedClass, Role role)
   {
      ScopeType scope = Seam.getComponentRoleScope(scannedClass, role);
      addComponentDescriptor( new ComponentDescriptor( role.name(), scannedClass, scope ) );
   }
View Full Code Here

            else if (out.getAnnotation().scope()==STATELESS)
            {
               throw new IllegalArgumentException("cannot specify explicit scope=STATELESS on @Out: " + out.toString());
            }
        
            ScopeType outScope = component == null ? out.getAnnotation().scope() : component.getScope();
           
            if (outScope ==  null)
            {
               throw new IllegalArgumentException("cannot determine scope to outject to on @Out: " + out.toString());
            }
        
            if (outScope.isContextActive())
            {
               if (value==null)
               {
                  outScope.getContext().remove(out.getContextVariableName());
               }
               else
               {
                  outScope.getContext().set(out.getContextVariableName(), value);
               }
            }
         }
      }
   }
View Full Code Here

      {
         throw new IllegalArgumentException(
                  "must specify either method or value in <factory/> declaration for variable: "
                           + name);
      }
      ScopeType scope = scopeName == null ? ScopeType.UNSPECIFIED : ScopeType.valueOf(scopeName
               .toUpperCase());
      boolean autoCreate = Boolean.parseBoolean(factory.attributeValue("auto-create"));
      factoryDescriptors.add(new FactoryDescriptor(name, scope, method, value, autoCreate));
   }
View Full Code Here

TOP

Related Classes of org.jboss.seam.ScopeType

Copyright © 2018 www.massapicom. 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.