
org.fabric3.implementation.pojo.provision.ImplementationManagerDefinition Maven / Gradle / Ivy
The newest version!
/*
* Fabric3
* Copyright (c) 2009-2015 Metaform Systems
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Portions originally based on Apache Tuscany 2007
* licensed under the Apache 2.0 license.
*/
package org.fabric3.implementation.pojo.provision;
import java.io.Serializable;
import java.net.URI;
import java.util.HashMap;
import java.util.Map;
import org.fabric3.api.model.type.java.Injectable;
import org.fabric3.api.model.type.java.InjectionSite;
import org.fabric3.api.model.type.java.Signature;
/**
* Base class for implementation manager factory definitions.
*/
public class ImplementationManagerDefinition implements Serializable {
private static final long serialVersionUID = 3516497485593609161L;
private String implementationClass;
private Signature constructor;
private Signature initMethod;
private Signature destroyMethod;
private boolean reinjectable;
private Map construction = new HashMap<>();
private Map postConstruction = new HashMap<>();
private Map reinjection = new HashMap<>();
private URI componentUri;
/**
* Returns the component URI for this implementation definition.
*
* @return the component URI for this implementation definition
*/
public URI getComponentUri() {
return componentUri;
}
/**
* Sets the component URI for this implementation definition.
*
* @param componentUri the component URI for this implementation definition
*/
public void setComponentUri(URI componentUri) {
this.componentUri = componentUri;
}
/**
* Returns the signature of the constructor that should be used.
*
* @return the signature of the constructor that should be used
*/
public Signature getConstructor() {
return constructor;
}
/**
* Sets the signature of the constructor that should be used.
*
* @param constructor the signature of the constructor that should be used
*/
public void setConstructor(Signature constructor) {
this.constructor = constructor;
}
/**
* Gets the init method.
*
* @return the signature for the init method
*/
public Signature getInitMethod() {
return initMethod;
}
/**
* Sets the init method.
*
* @param initMethod the signature of the init method
*/
public void setInitMethod(Signature initMethod) {
this.initMethod = initMethod;
}
/**
* Gets the destroy method.
*
* @return the signature of the destroy method
*/
public Signature getDestroyMethod() {
return destroyMethod;
}
/**
* Sets the destroy method.
*
* @param destroyMethod the signature of the destroy method
*/
public void setDestroyMethod(Signature destroyMethod) {
this.destroyMethod = destroyMethod;
}
/**
* Gets the implementation class.
*
* @return Implementation class.
*/
public String getImplementationClass() {
return implementationClass;
}
/**
* Sets the implementation class.
*
* @param implementationClass Implementation class.
*/
public void setImplementationClass(String implementationClass) {
this.implementationClass = implementationClass;
}
/**
* Returns the map of injections to be performed during construction.
*
* @return the map of injections to be performed during construction
*/
public Map getConstruction() {
return construction;
}
/**
* Returns the map of injections to be performed after construction.
*
* @return the map of injections to be performed after construction
*/
public Map getPostConstruction() {
return postConstruction;
}
/**
* Returns the map of injections to be performed during reinjection.
*
* @return the map of injections to be performed during reinjection
*/
public Map getReinjectables() {
return reinjection;
}
/**
* Returns true if the implementation is reinjectable, e.g. it is composite-scoped.
*
* @return true if the implementation is reinjectable, e.g. it is composite-scoped
*/
public boolean isReinjectable() {
return reinjectable;
}
/**
* Sets if the implementation is reinjectable.
*
* @param reinjectable true if the implementation is reinjectable
*/
public void setReinjectable(boolean reinjectable) {
this.reinjectable = reinjectable;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy