Examples of ExcludeListMetaData


Examples of org.jboss.metadata.ejb.spec.ExcludeListMetaData

    */
   public boolean hasMethodPermissions(String methodName, Class<?>[] params, MethodInterfaceType interfaceType)
   {
      // First check the excluded method list as this takes priority over
      // all other assignments
      ExcludeListMetaData excluded = getExcludeList();
      if (excluded != null && excluded.matches(methodName, params, interfaceType))
         return true;

      // Check the permissioned methods list
      MethodPermissionsMetaData permissions = getMethodPermissions();
      if (permissions != null)
View Full Code Here

Examples of org.jboss.metadata.ejb.spec.ExcludeListMetaData

      assertNotNull(role2);
      assertEquals("Role2", role2.getRoleName());

      // @DenyAll
      // cls.getDeclaredMethods is un-ordered, so we must use bestMatch
      ExcludeListMetaData excludes = assembly.getExcludeList();
      assertNotNull(excludes);
      MethodsMetaData excludedMethods = excludes.getMethods();
      assertEquals(2, excludedMethods.size());
      MethodMetaData m0 = excludedMethods.bestMatch("denyAll", (Class[]) null, null, null);
      assertEquals("MyStatelessBean", m0.getEjbName());
      assertEquals("denyAll", m0.getMethodName());
      MethodParametersMetaData noargs = new MethodParametersMetaData();
View Full Code Here

Examples of org.jboss.metadata.ejb.spec.ExcludeListMetaData

      assertNotNull(role2);
      assertEquals("Role2", role2.getRoleName());

      // @DenyAll
      // cls.getDeclaredMethods is un-ordered, so we must use bestMatch
      ExcludeListMetaData excludes = assembly.getExcludeList();
      assertNotNull(excludes);
      MethodsMetaData excludedMethods = excludes.getMethods();
      assertEquals(2, excludedMethods.size());
      MethodMetaData m0 = excludedMethods.bestMatch("denyAll", (Class[]) null, null, null);
      assertEquals("MyStatelessBean", m0.getEjbName());
      assertEquals("denyAll", m0.getMethodName());
      MethodParametersMetaData noargs = new MethodParametersMetaData();
View Full Code Here

Examples of org.jboss.metadata.ejb.spec.ExcludeListMetaData

            final AssemblyDescriptorMetaData assemblyDescriptor = ejbJarMetadata.getAssemblyDescriptor();
            if (assemblyDescriptor != null) {

                //handle exclude-list

                final ExcludeListMetaData excludeList = assemblyDescriptor.getExcludeListByEjbName(componentDescription.getEJBName());
                if (excludeList != null && excludeList.getMethods() != null) {
                    for (final MethodMetaData method : excludeList.getMethods()) {
                        final String methodName = method.getMethodName();
                        final MethodIntf defaultMethodIntf = (componentDescription instanceof MessageDrivenComponentDescription) ? MethodIntf.MESSAGE_ENDPOINT : MethodIntf.BEAN;
                        final MethodIntf methodIntf = this.getMethodIntf(method.getMethodIntf(), defaultMethodIntf);
                        if (methodName.equals("*")) {
                            componentDescription.getDescriptorMethodPermissions().setAttribute(methodIntf, null, EJBMethodSecurityAttribute.denyAll());
View Full Code Here

Examples of org.jboss.metadata.ejb.spec.ExcludeListMetaData

         securityRoles = new SecurityRolesMetaData();
         assembly.setSecurityRoles(securityRoles);
      }
      super.processClass(securityRoles, beanClass);
      // @DenyAll
      ExcludeListMetaData excludes = assembly.getExcludeList();
      if(excludes == null)
      {
         excludes = new ExcludeListMetaData();
         assembly.setExcludeList(excludes);
      }
      super.processClass(excludes, beanClass);

      // @RolesAllowed, @PermitAll
View Full Code Here

Examples of org.jboss.metadata.ejb.spec.ExcludeListMetaData

                  }
               }
         }

      // Process the exclude-list MethodMetaData
      ExcludeListMetaData excluded = bean.getExcludeList();
      if (excluded != null)
      {
         MethodsMetaData methods = excluded.getMethods();
         if (methods != null)
            for (org.jboss.metadata.ejb.spec.MethodMetaData mmd : methods)
            {
               String[] params =
               {};
View Full Code Here

Examples of org.jboss.metadata.ejb.spec.ExcludeListMetaData

      JBossMetaData jbossMetaData = getJBossMetaDataWithCheck();
     
      // First check the excluded method list as this takes priority over
      // all other assignments
      ExcludeListMetaData excluded = getExcludeList();
      if (excluded != null && excluded.matches(methodName, params, interfaceType))
      {
         // No one is allowed to execute this method so add a role that
         // fails to equate to any Principal or Principal name and return.
         // We don't return null to differentiate between an explicit
         // assignment of no access and no assignment information.
View Full Code Here

Examples of org.jboss.metadata.ejb.spec.ExcludeListMetaData

    */
   public boolean hasMethodPermissions(String methodName, Class<?>[] params, MethodInterfaceType interfaceType)
   {
      // First check the excluded method list as this takes priority over
      // all other assignments
      ExcludeListMetaData excluded = getExcludeList();
      if (excluded != null && excluded.matches(methodName, params, interfaceType))
         return true;

      // Check the permissioned methods list
      MethodPermissionsMetaData permissions = getMethodPermissions();
      if (permissions != null)
View Full Code Here

Examples of org.jboss.metadata.ejb.spec.ExcludeListMetaData

        final String ejbName = beanMetaData.getEjbName();
        final AssemblyDescriptorMetaData assemblyDescriptor = beanMetaData.getAssemblyDescriptor();
        if (assemblyDescriptor == null) {
            return;
        }
        final ExcludeListMetaData excludeList = assemblyDescriptor.getExcludeListByEjbName(ejbName);
        if (excludeList == null) {
            return;
        }
        final MethodsMetaData methods = excludeList.getMethods();
        if (methods == null || methods.isEmpty()) {
            return;
        }
        final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
        final EEModuleDescription moduleDescription = deploymentUnit.getAttachment(Attachments.EE_MODULE_DESCRIPTION);
View Full Code Here

Examples of org.jboss.metadata.ejb.spec.ExcludeListMetaData

/*      */   {
/* 1174 */     Set result = null;
/*      */
/* 1176 */     JBossMetaData jbossMetaData = getJBossMetaDataWithCheck();
/*      */
/* 1180 */     ExcludeListMetaData excluded = getExcludeList();
/* 1181 */     if ((excluded != null) && (excluded.matches(methodName, params, interfaceType)))
/*      */     {
/* 1187 */       if (result == null)
/* 1188 */         result = new HashSet();
/* 1189 */       result.add("<NOBODY>");
/* 1190 */       return result;
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.