Package org.glassfish.security.services.config

Examples of org.glassfish.security.services.config.SecurityConfigurations


    }
  }
       
        private SecurityConfigurations getSecurityConfigurations(final ActionReport report) {
            // Lookup or Create the security configurations
            SecurityConfigurations result = domain.getExtensionByType(SecurityConfigurations.class);
            if (result == null) {
                try {
                    result = (SecurityConfigurations) ConfigSupport.apply(new SingleConfigCode<Domain>() {
                        @Override
                        public Object run(Domain wDomain) throws PropertyVetoException, TransactionFailure {
                            SecurityConfigurations s = wDomain.createChild(SecurityConfigurations.class);
                            wDomain.getExtensions().add(s);
                            return s;
                        }
                    }, domain);
                } catch (TransactionFailure transactionFailure)  {
View Full Code Here


    static SecurityConfiguration findSecurityConfiguration(
            final Domain domain,
            final String serviceName,
            final ActionReport report) {
        // Lookup the security configurations
        SecurityConfigurations secConfigs = domain.getExtensionByType(SecurityConfigurations.class);
        if (secConfigs == null) {
            report.setMessage("Unable to locate security configurations");
            report.setActionExitCode(ActionReport.ExitCode.FAILURE);
            return null;
        }

        // Get the security service
        SecurityConfiguration ssc = secConfigs.getSecurityServiceByName(serviceName);
        if (ssc == null) {
            report.setMessage("Unable to locate security service: " + serviceName);
            report.setActionExitCode(ActionReport.ExitCode.FAILURE);
            return null;
        }
View Full Code Here

   */
  public static <T extends SecurityConfiguration> T getSecurityServiceConfiguration(Domain domain, Class<T> type) {
    T config = null;

    // Look for security service configurations
    SecurityConfigurations secConfigs = domain.getExtensionByType(SecurityConfigurations.class);
    if (secConfigs != null) {
      // Look for the service configuration marked default
      config = secConfigs.getDefaultSecurityServiceByType(type);
      if (config == null) {
        // Obtain the first service configuration listed
        List<T> configs = secConfigs.getSecurityServicesByType(type);
        if (!configs.isEmpty())
          config = configs.get(0);
      }
    }

View Full Code Here

    }
  }
       
        private SecurityConfigurations getSecurityConfigurations(final ActionReport report) {
            // Lookup or Create the security configurations
            SecurityConfigurations result = domain.getExtensionByType(SecurityConfigurations.class);
            if (result == null) {
                try {
                    result = (SecurityConfigurations) ConfigSupport.apply(new SingleConfigCode<Domain>() {
                        @Override
                        public Object run(Domain wDomain) throws PropertyVetoException, TransactionFailure {
                            SecurityConfigurations s = wDomain.createChild(SecurityConfigurations.class);
                            wDomain.getExtensions().add(s);
                            return s;
                        }
                    }, domain);
                } catch (TransactionFailure transactionFailure)  {
View Full Code Here

    public static SecurityConfiguration findSecurityConfiguration(
            final Domain domain,
            final String serviceName,
            final ActionReport report) {
        // Lookup the security configurations
        SecurityConfigurations secConfigs = domain.getExtensionByType(SecurityConfigurations.class);
        if (secConfigs == null) {
            report.setMessage("Unable to locate security configurations");
            report.setActionExitCode(ActionReport.ExitCode.FAILURE);
            return null;
        }

        // Get the security service
        SecurityConfiguration ssc = secConfigs.getSecurityServiceByName(serviceName);
        if (ssc == null) {
            report.setMessage("Unable to locate security service: " + serviceName);
            report.setActionExitCode(ActionReport.ExitCode.FAILURE);
            return null;
        }
View Full Code Here

TOP

Related Classes of org.glassfish.security.services.config.SecurityConfigurations

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.