Interface ProfileApplicationDecorator
-
- All Superinterfaces:
EObject
,Notifier
,ProfileApplication
- All Known Implementing Classes:
ProfileApplicationDecoratorImpl
public interface ProfileApplicationDecorator extends ProfileApplication
This object decorates theProfileApplication
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addNestedEObject(EObject container, EReference eReference, EObject eObject)
Adds a nested eObject to the container and sets this profile application to dirty.StereotypeApplication
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
.String
getName()
Gets the Name of this profile application.String
getProfileName()
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 not-
Methods 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 Detail
-
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
void save() throws IOException, CoreException
To save this profile application- Throws:
IOException
CoreException
-
getApplicableStereotypes
Collection<? extends StereotypeApplicability> getApplicableStereotypes(EObject eObject)
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
void addNestedEObject(EObject container, EReference eReference, EObject eObject)
Adds a nested eObject to the container and sets this profile application to dirty.- Parameters:
container
-eReference
-eObject
-
-
removeEObject
void removeEObject(EObject object)
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:
-
-