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

org.andromda.metafacades.uml14.CallEventFacadeLogic Maven / Gradle / Ivy

Go to download

The UML 1.4 metafacades. This is the set of UML 1.4 metafacades implementations. These implement the common UML metafacades.

The newest version!
// license-header java merge-point
//
// Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
//
package org.andromda.metafacades.uml14;

import java.util.Collection;
import java.util.List;
import org.andromda.core.metafacade.MetafacadeBase;
import org.andromda.core.metafacade.ModelValidationMessage;
import org.andromda.metafacades.uml.CallEventFacade;
import org.andromda.metafacades.uml.OperationFacade;
import org.apache.log4j.Logger;
import org.omg.uml.behavioralelements.statemachines.CallEvent;

/**
 * 

* A representation of the model object 'Activity'. The * specification of parameterized behavior as the coordinated * sequencing of subordinate units whose individual elements are * actions. *

* MetafacadeLogic for CallEventFacade * * @see CallEventFacade */ public abstract class CallEventFacadeLogic extends EventFacadeLogicImpl implements CallEventFacade { /** * The underlying UML object * @see CallEvent */ protected CallEvent metaObject; /** Create Metafacade implementation instance using the MetafacadeFactory from the context * @param metaObjectIn * @param context */ protected CallEventFacadeLogic(CallEvent metaObjectIn, String context) { super(metaObjectIn, getContext(context)); this.metaObject = metaObjectIn; } /** * The logger instance. */ private static final Logger logger = Logger.getLogger(CallEventFacadeLogic.class); /** * Gets the context for this metafacade logic instance. * @param context String. Set to CallEventFacade if null * @return context String */ private static String getContext(String context) { if (context == null) { context = "org.andromda.metafacades.uml.CallEventFacade"; } return context; } /** Reset context only for non-root metafacades * @param context */ @Override public void resetMetafacadeContext(String context) { if (!this.contextRoot) // reset context only for non-root metafacades { context = getContext(context); // to have same value as in original constructor call setMetafacadeContext (context); } } /** * @return boolean true always * @see CallEventFacade */ public boolean isCallEventFacadeMetaType() { return true; } // ------------- associations ------------------ /** * * @return (OperationFacade)handleGetOperation() */ public final OperationFacade getOperation() { OperationFacade getOperation1r = null; // callEventFacade has no pre constraints Object result = handleGetOperation(); MetafacadeBase shieldedResult = this.shieldedElement(result); try { getOperation1r = (OperationFacade)shieldedResult; } catch (ClassCastException ex) { // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn CallEventFacadeLogic.logger.warn("incorrect metafacade cast for CallEventFacadeLogic.getOperation OperationFacade " + result + ": " + shieldedResult); } // callEventFacade has no post constraints return getOperation1r; } /** * UML Specific type is transformed by shieldedElements to AndroMDA Metafacade type * @return Object */ protected abstract Object handleGetOperation(); /** * * @return (Collection)handleGetOperations() */ public final Collection getOperations() { Collection getOperations2r = null; // callEventFacade has no pre constraints Collection result = handleGetOperations(); List shieldedResult = this.shieldedElements(result); try { getOperations2r = (Collection)shieldedResult; } catch (ClassCastException ex) { // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn CallEventFacadeLogic.logger.warn("incorrect metafacade cast for CallEventFacadeLogic.getOperations Collection " + result + ": " + shieldedResult); } // callEventFacade has no post constraints return getOperations2r; } /** * UML Specific type is returned in Collection, transformed by shieldedElements to AndroMDA Metafacade type * @return Collection */ protected abstract Collection handleGetOperations(); /** * @param validationMessages Collection * @see EventFacadeLogicImpl#validateInvariants(Collection validationMessages) */ @Override public void validateInvariants(Collection validationMessages) { super.validateInvariants(validationMessages); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy