All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tangosol.coherence.config.xml.processor.StorageAccessAuthorizerBuilderProcessor Maven / Gradle / Ivy

/*
 * Copyright (c) 2000, 2020, Oracle and/or its affiliates.
 *
 * Licensed under the Universal Permissive License v 1.0 as shown at
 * http://oss.oracle.com/licenses/upl.
 */
package com.tangosol.coherence.config.xml.processor;

import com.tangosol.coherence.config.builder.ParameterizedBuilder;

import com.tangosol.config.ConfigurationException;
import com.tangosol.config.xml.ElementProcessor;
import com.tangosol.config.xml.ProcessingContext;
import com.tangosol.config.xml.XmlSimpleName;

import com.tangosol.net.security.StorageAccessAuthorizer;

import com.tangosol.run.xml.XmlElement;

/**
 * An {@link ElementProcessor} for <storage-authorizer> elements defined by
 * a Coherence Operational Configuration file.
 *
 * @author bo  2014.10.27
 * @since Coherence 12.1.3
 */
@XmlSimpleName("storage-authorizer")
public class StorageAccessAuthorizerBuilderProcessor
        extends AbstractEmptyElementProcessor>
    {
    // ----- constructors ---------------------------------------------------

    /**
     * Constructs a {@link StorageAccessAuthorizerBuilderProcessor}.
     */
    public StorageAccessAuthorizerBuilderProcessor()
        {
        super(EmptyElementBehavior.IGNORE);
        }

    // ----- AbstractEmptyElementProcessor methods --------------------------

    @Override
    public ParameterizedBuilder onProcess(ProcessingContext context, XmlElement xmlElement)
            throws ConfigurationException
        {
        // assume the  contains a builder definition
        ParameterizedBuilder bldr = ElementProcessorHelper.processParameterizedBuilder(context, xmlElement);

        if (bldr == null)
            {
            throw new ConfigurationException(" fails to correctly define a StorageAccessAuthorizer implementation: "
                                             + xmlElement, "Please define a ");
            }

        return (ParameterizedBuilder) bldr;
        }
    }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy