Interface ProfileApplicationDecorator
- All Superinterfaces:
EObject
,Notifier
,ProfileApplication
- All Known Implementing Classes:
ProfileApplicationDecoratorImpl
This object decorates the
ProfileApplication
with additional
functionalities, e.g. the semantic name of the profile application
(constructed of profile name and location of profile application resource),
the status if profile application has changed and needs to be saved,
or convenience methods to apply/remove stereotypes
or nested objects.-
Method Summary
Modifier and TypeMethodDescriptionvoid
addNestedEObject
(EObject container, EReference eReference, EObject eObject) Adds a nested eObject to the container and sets this profile application to dirty.applyStereotype
(StereotypeApplicability stereotypeApplicability, EObject eObject) Applies the specifiedapplicableStereotype
.Collection<? extends StereotypeApplicability>
getApplicableStereotypes
(EObject eObject) Returns the list of applicable stereotype for the specified type ineClass
.getName()
Gets the Name of this profile application.Gets the name of the loaded profile.boolean
isDirty()
Is this profile application changed and if it needs to be savedvoid
removeEObject
(EObject object) Removes the nested object from the profile application resource and sets it to dirty state.void
save()
To save this profile applicationvoid
setDirty
(boolean dirty) To set if profile application has changed or notMethods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
Methods inherited from interface org.modelversioning.emfprofileapplication.ProfileApplication
getAnnotatedObjects, getImportedProfiles, getStereotypeApplications, getStereotypeApplications, getStereotypeApplications
-
Method Details
-
isDirty
boolean isDirty()Is this profile application changed and if it needs to be saved- Returns:
-
setDirty
void setDirty(boolean dirty) To set if profile application has changed or not- Parameters:
dirty
-
-
getName
String getName()Gets the Name of this profile application.
The name is constructed out of loaded profile name and the location of this profile application resource in the workspace.- Returns:
-
save
To save this profile application- Throws:
IOException
CoreException
-
getApplicableStereotypes
Returns the list of applicable stereotype for the specified type ineClass
.
Note: The method is actually implemented inIProfileFacade
, so this method forwards the call to the facade.- Parameters:
eClass
- to get applicable stereotype for.- Returns:
- the list of applicable
Stereotype
s.
-
applyStereotype
StereotypeApplication applyStereotype(StereotypeApplicability stereotypeApplicability, EObject eObject) Applies the specifiedapplicableStereotype
.
Note: The method is actually implemented inIProfileFacade
, so this method forwards the call to the facade.This method is a convenience method for
It also sets the state of this profile application to dirty.#apply(Stereotype, EObject, Extension)
.- Parameters:
stereotypeApplicability
- the applicable stereotype to be applied.eObject
- to apply theapplicableStereotype
to.- Returns:
- the created instance of the
Stereotype
.
-
addNestedEObject
Adds a nested eObject to the container and sets this profile application to dirty.- Parameters:
container
-eReference
-eObject
-
-
removeEObject
Removes the nested object from the profile application resource and sets it to dirty state.- Parameters:
object
-
-
getProfileName
String getProfileName()Gets the name of the loaded profile.- Returns:
-