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

org.andromda.metafacades.uml14.ActorFacadeLogic 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.ModelValidationMessage;
import org.andromda.metafacades.uml.ActorFacade;
import org.apache.log4j.Logger;
import org.omg.uml.behavioralelements.usecases.Actor;

/**
 * 

* An actor specifies a role played by a user or any other system * that interacts with the subject. *

* MetafacadeLogic for ActorFacade * * @see ActorFacade */ public abstract class ActorFacadeLogic extends ClassifierFacadeLogicImpl implements ActorFacade { /** * The underlying UML object * @see Actor */ protected Actor metaObject; /** Create Metafacade implementation instance using the MetafacadeFactory from the context * @param metaObjectIn * @param context */ protected ActorFacadeLogic(Actor metaObjectIn, String context) { super(metaObjectIn, getContext(context)); this.metaObject = metaObjectIn; } /** * The logger instance. */ private static final Logger logger = Logger.getLogger(ActorFacadeLogic.class); /** * Gets the context for this metafacade logic instance. * @param context String. Set to ActorFacade if null * @return context String */ private static String getContext(String context) { if (context == null) { context = "org.andromda.metafacades.uml.ActorFacade"; } 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 ActorFacade */ public boolean isActorFacadeMetaType() { return true; } // ------------- associations ------------------ private List __getGeneralizedByActors3r; private boolean __getGeneralizedByActors3rSet = false; /** *

* All actors generalized by this actor. *

* @return (List)handleGetGeneralizedByActors() */ public final List getGeneralizedByActors() { List getGeneralizedByActors3r = this.__getGeneralizedByActors3r; if (!this.__getGeneralizedByActors3rSet) { // generalizedActors has no pre constraints List result = handleGetGeneralizedByActors(); List shieldedResult = this.shieldedElements(result); try { getGeneralizedByActors3r = (List)shieldedResult; } catch (ClassCastException ex) { // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn ActorFacadeLogic.logger.warn("incorrect metafacade cast for ActorFacadeLogic.getGeneralizedByActors List " + result + ": " + shieldedResult); } // generalizedActors has no post constraints this.__getGeneralizedByActors3r = getGeneralizedByActors3r; if (isMetafacadePropertyCachingEnabled()) { this.__getGeneralizedByActors3rSet = true; } } return getGeneralizedByActors3r; } /** * UML Specific type is returned in Collection, transformed by shieldedElements to AndroMDA Metafacade type * @return List */ protected abstract List handleGetGeneralizedByActors(); private List __getGeneralizedActors4r; private boolean __getGeneralizedActors4rSet = false; /** *

* The set of actors that generalize this actor. *

* @return (List)handleGetGeneralizedActors() */ public final List getGeneralizedActors() { List getGeneralizedActors4r = this.__getGeneralizedActors4r; if (!this.__getGeneralizedActors4rSet) { // generalizedByActors has no pre constraints List result = handleGetGeneralizedActors(); List shieldedResult = this.shieldedElements(result); try { getGeneralizedActors4r = (List)shieldedResult; } catch (ClassCastException ex) { // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn ActorFacadeLogic.logger.warn("incorrect metafacade cast for ActorFacadeLogic.getGeneralizedActors List " + result + ": " + shieldedResult); } // generalizedByActors has no post constraints this.__getGeneralizedActors4r = getGeneralizedActors4r; if (isMetafacadePropertyCachingEnabled()) { this.__getGeneralizedActors4rSet = true; } } return getGeneralizedActors4r; } /** * UML Specific type is returned in Collection, transformed by shieldedElements to AndroMDA Metafacade type * @return List */ protected abstract List handleGetGeneralizedActors(); /** * @param validationMessages Collection * @see ClassifierFacadeLogicImpl#validateInvariants(Collection validationMessages) */ @Override public void validateInvariants(Collection validationMessages) { super.validateInvariants(validationMessages); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy