Package org.jboss.jca.common.api.metadata.resourceadapter

Examples of org.jboss.jca.common.api.metadata.resourceadapter.WorkManagerSecurity


        model.get(Constants.ARCHIVE.getName()).set(name);
        setAttribute(model, Constants.BOOTSTRAP_CONTEXT, ironJacamarMetadata.getBootstrapContext());
        if (ironJacamarMetadata.getTransactionSupport() != null)
            model.get(Constants.TRANSACTION_SUPPORT.getName()).set(ironJacamarMetadata.getTransactionSupport().name());
            if (ironJacamarMetadata.getWorkManager() != null && ironJacamarMetadata.getWorkManager().getSecurity() != null) {
                WorkManagerSecurity security = ironJacamarMetadata.getWorkManager().getSecurity();
                model.get(Constants.WM_SECURITY.getName()).set(true);
                if (security.getDefaultGroups() != null) {
                    for (String group : security.getDefaultGroups()) {
                        model.get(Constants.WM_SECURITY_DEFAULT_GROUPS.getName()).add(group);
                    }
                }
                if (security.getDefaultPrincipal() != null)
                    model.get(Constants.WM_SECURITY_DEFAULT_PRINCIPAL.getName()).set(security.getDefaultPrincipal());
                model.get(Constants.WM_SECURITY_MAPPING_REQUIRED.getName()).set(security.isMappingRequired());
                model.get(Constants.WM_SECURITY_DOMAIN.getName()).set(security.getDomain());
                if (security.getGroupMappings() != null) {
                    for (Map.Entry<String, String> entry : security.getGroupMappings().entrySet()) {
                        final Resource mapping = new IronJacamarResource.IronJacamarRuntimeResource();
                        final ModelNode subModel = mapping.getModel();
                        subModel.get(Constants.WM_SECURITY_MAPPING_FROM.getName()).set(entry.getKey());
                        subModel.get(Constants.WM_SECURITY_MAPPING_TO.getName()).set(entry.getKey());
                        final PathElement element = PathElement.pathElement(Constants.WM_SECURITY_MAPPING_GROUPS.getName(), WM_SECURITY_MAPPING_GROUP.getName());
                        ijResourceAdapter.registerChild(element, mapping);
                    }
                }
                if (security.getUserMappings() != null) {
                    for (Map.Entry<String, String> entry : security.getUserMappings().entrySet()) {
                        final Resource mapping = new IronJacamarResource.IronJacamarRuntimeResource();
                        final ModelNode subModel = mapping.getModel();
                        subModel.get(Constants.WM_SECURITY_MAPPING_FROM.getName()).set(entry.getKey());
                        subModel.get(Constants.WM_SECURITY_MAPPING_TO.getName()).set(entry.getKey());
                        final PathElement element = PathElement.pathElement(Constants.WM_SECURITY_MAPPING_USERS.getName(), WM_SECURITY_MAPPING_USER.getName());
View Full Code Here


                        builder.addDependency(SecurityDomainService.SERVICE_NAME.append(cd.getRecovery().getCredential().getSecurityDomain()));
                    }
                }
            }
            if (resourceAdapter.getWorkManager() != null) {
                final WorkManagerSecurity workManagerSecurity = resourceAdapter.getWorkManager().getSecurity();
                if (workManagerSecurity != null) {
                    final String securityDomainName = workManagerSecurity.getDomain();
                    if (securityDomainName != null) {
                        builder.addDependency(SecurityDomainService.SERVICE_NAME.append(securityDomainName));
                    }
                }
            }
View Full Code Here

        throw new ParserException(bundle.unexpectedEndOfDocument());
    }

    protected WorkManager parseWorkManager(final ModelNode operation, final XMLStreamReader reader) throws XMLStreamException, ParserException,
            ValidateException {
        WorkManagerSecurity security = null;

        while (reader.hasNext()) {
            switch (reader.nextTag()) {
                case END_ELEMENT: {
                    if (Activation.Tag.forName(reader.getLocalName()) == Activation.Tag.WORKMANAGER) {
View Full Code Here

    * @exception ValidateException ValidateException
    */
   protected WorkManager parseWorkManager(XMLStreamReader reader) throws XMLStreamException, ParserException,
      ValidateException
   {
      WorkManagerSecurity security = null;

      while (reader.hasNext())
      {
         switch (reader.nextTag())
         {
View Full Code Here

TOP

Related Classes of org.jboss.jca.common.api.metadata.resourceadapter.WorkManagerSecurity

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.