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

org.nuiton.web.AbstractSecurityTopiaApplicationContext Maven / Gradle / Ivy

There is a newer version: 1.20
Show newest version
package org.nuiton.web;

/*-
 * #%L
 * Nuiton Web :: Nuiton Security
 * %%
 * Copyright (C) 2010 - 2017 CodeLutin
 * %%
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Lesser Public License for more details.
 * 
 * You should have received a copy of the GNU General Lesser Public
 * License along with this program.  If not, see
 * .
 * #L%
 */

import java.util.Map;
import java.util.Properties;
import java.util.Set;
import javax.annotation.Generated;
import org.nuiton.topia.persistence.TopiaConfiguration;
import org.nuiton.topia.persistence.TopiaEntity;
import org.nuiton.topia.persistence.TopiaEntityEnumProvider;
import org.nuiton.topia.persistence.internal.AbstractTopiaApplicationContext;
import org.nuiton.topia.persistence.internal.AbstractTopiaPersistenceContextConstructorParameter;

@Generated(value = "org.nuiton.topia.templates.ApplicationContextTransformer", date = "Thu Sep 07 10:56:15 CEST 2017")
public abstract class AbstractSecurityTopiaApplicationContext extends AbstractTopiaApplicationContext implements TopiaEntityEnumProvider {

    @Deprecated
    protected AbstractSecurityTopiaApplicationContext(Properties properties) {
        super(properties);
    }

    @Deprecated
    protected AbstractSecurityTopiaApplicationContext(Map configuration) {
        super(configuration);
    }

    protected AbstractSecurityTopiaApplicationContext(TopiaConfiguration topiaConfiguration) {
        super(topiaConfiguration);
    }

    @Override
    public SecurityTopiaPersistenceContext newPersistenceContext() {

        SecurityTopiaPersistenceContext newContext = new SecurityTopiaPersistenceContext(
                new AbstractTopiaPersistenceContextConstructorParameter(
                        getHibernateProvider(),
                        getTopiaFiresSupport(),
                        getTopiaIdFactory(),
                        getSessionRegistry()
                )
        );
        registerPersistenceContext(newContext);
        return newContext;
    }

    @Override
    public String getModelVersion() {
        return "";
    }

    @Override
    public String getModelName() {
        return "Security";
    }

    @Override
    public  Class getContractClass(Class klass) {
        return SecurityEntityEnum.getContractClass(klass);
    }

    @Override
    public Class[] getContractClasses() {
        return SecurityEntityEnum.getContractClasses();
    }

    @Override
    public  Class getImplementationClass(Class klass) {
        return SecurityEntityEnum.getImplementationClass(klass);
    }

    @Override
    public Set> getImplementationClasses() {
        return SecurityEntityEnum.getImplementationClasses();
    }

    public SecurityEntityEnum[] getContracts() {
        return SecurityEntityEnum.getContracts();
    }

    @Override
    public  SecurityEntityEnum getEntityEnum(Class type) {
        return SecurityEntityEnum.valueOf(type);
    }

    @Override
    public SecurityEntityEnum getEntityEnum(String name) {
        return SecurityEntityEnum.valueOf(name);
    }

} //AbstractSecurityTopiaApplicationContext




© 2015 - 2025 Weber Informatics LLC | Privacy Policy