001/**
002 *  Licensed to the Apache Software Foundation (ASF) under one or more
003 *  contributor license agreements.  See the NOTICE file distributed with
004 *  this work for additional information regarding copyright ownership.
005 *  The ASF licenses this file to You under the Apache License, Version 2.0
006 *  (the "License"); you may not use this file except in compliance with
007 *  the License.  You may obtain a copy of the License at
008 *
009 *     http://www.apache.org/licenses/LICENSE-2.0
010 *
011 *  Unless required by applicable law or agreed to in writing, software
012 *  distributed under the License is distributed on an "AS IS" BASIS,
013 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 *  See the License for the specific language governing permissions and
015 *  limitations under the License.
016 */
017package org.apache.isis.core.metamodel.spec;
018
019import org.apache.isis.core.commons.authentication.AuthenticationSessionProvider;
020import org.apache.isis.core.metamodel.adapter.ServicesProvider;
021import org.apache.isis.core.metamodel.deployment.DeploymentCategory;
022import org.apache.isis.core.metamodel.specloader.facetprocessor.FacetProcessor;
023
024public class SpecificationContext {
025
026    private final DeploymentCategory deploymentCategory;
027    private final AuthenticationSessionProvider authenticationSessionProvider;
028    private final ServicesProvider servicesProvider;
029    private final ObjectInstantiator objectInstantiator;
030    private final SpecificationLoader specificationLookup;
031    private final FacetProcessor facetProcessor;
032
033    public SpecificationContext(
034            final DeploymentCategory deploymentCategory, 
035            final AuthenticationSessionProvider authenticationSessionProvider, 
036            final ServicesProvider servicesProvider, 
037            final ObjectInstantiator objectInstantiator, 
038            final SpecificationLoader specificationLookup,
039            final FacetProcessor facetProcessor) {
040        this.deploymentCategory = deploymentCategory;
041        this.authenticationSessionProvider = authenticationSessionProvider;
042        this.servicesProvider = servicesProvider;
043        this.objectInstantiator = objectInstantiator;
044        this.specificationLookup = specificationLookup;
045        this.facetProcessor = facetProcessor;
046    }
047
048    public DeploymentCategory getDeploymentCategory() {
049        return deploymentCategory;
050    }
051    
052    public AuthenticationSessionProvider getAuthenticationSessionProvider() {
053        return authenticationSessionProvider;
054    }
055
056    public ServicesProvider getServicesProvider() {
057        return servicesProvider;
058    }
059
060    public ObjectInstantiator getObjectInstantiator() {
061        return objectInstantiator;
062    }
063
064    public SpecificationLoader getSpecificationLookup() {
065        return specificationLookup;
066    }
067
068    public FacetProcessor getFacetProcessor() {
069        return facetProcessor;
070    }
071}