cz.cuni.amis.pogamut.sposh.elements
Interface INamedElement

Package class diagram package INamedElement
All Known Subinterfaces:
IParametrizedElement, IReferenceElement
All Known Implementing Classes:
ActionPattern, Adopt, Competence, CompetenceElement, DriveCollection, DriveElement, Sense, TriggeredAction

public interface INamedElement

Interface for lap elements with name. Most of the elements have a name, but some (e.g. {@link Goal)) don't.

Author:
HonzaH

Method Summary
 String getName()
          Get name of the element.
 void rename(String newName)
          Change name of the element to newName.
 

Method Detail

getName

String getName()
Get name of the element. The actual name, not display name (e.g. action can have FQN of class, but display name would be derived fromk annotations of the class) or representation (e.g. sense name "health" is different from actual condition of sense "health > 90").

Returns:
Name of the element

rename

void rename(String newName)
            throws InvalidNameException,
                   CycleException,
                   DuplicateNameException
Change name of the element to newName. Renaming doesn't just change name, it also changes all references in the plan from the old name to a new one.

Parameters:
newName - New name of the element.
Throws:
InvalidNameException - Passed name is not valid Yaposh name.
CycleException - Renaming causes cycle.
DuplicateNameException - Such name is already used in the plan.


Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.