com.telelogic.rhapsody.core
Interface IRPUnit
- All Superinterfaces:
- IRPModelElement
- All Known Subinterfaces:
- IRPActivityDiagram, IRPActor, IRPAnnotation, IRPArgument, IRPAssociationClass, IRPAttribute, IRPClass, IRPClassifier, IRPCollaborationDiagram, IRPComment, IRPComponent, IRPComponentDiagram, IRPConstraint, IRPControlledFile, IRPDeploymentDiagram, IRPDiagram, IRPEvent, IRPEventReception, IRPFile, IRPFlowchart, IRPFlowItem, IRPInstance, IRPInterfaceItem, IRPLink, IRPMatrixLayout, IRPMatrixView, IRPModule, IRPNode, IRPObjectModelDiagram, IRPOperation, IRPPackage, IRPPanelDiagram, IRPPort, IRPProfile, IRPProject, IRPRelation, IRPRequirement, IRPSequenceDiagram, IRPStatechart, IRPStatechartDiagram, IRPStereotype, IRPStructureDiagram, IRPSysMLPort, IRPTableLayout, IRPTableView, IRPTag, IRPTemplateParameter, IRPTimingDiagram, IRPType, IRPUseCase, IRPUseCaseDiagram, IRPVariable
public interface IRPUnit
- extends IRPModelElement
The IRPUnit interface represents model elements that can be saved as separate files.
Method Summary |
IRPUnit |
copyToAnotherProject(IRPModelElement parentInTarget)
Makes an editable copy of the unit in a different project. |
int |
getAddToModelMode()
Returns an indication of how the unit was added to the model. |
java.lang.String |
getCMHeader()
Returns the header used by the Configuration Management tool for the unit. |
int |
getCMState()
Returns the configuration management state of the unit. |
java.lang.String |
getCurrentDirectory()
Gets the name of the directory that contains the file used to store the unit. |
java.lang.String |
getFilename()
Gets the name of the file used to store the unit. |
int |
getIncludeInNextLoad()
Checks whether the unit is going to be loaded the next time the model is loaded. |
int |
getIsStub()
Checks whether the unit is currently unloaded. |
java.lang.String |
getLanguage()
Gets the language of the unit. |
java.lang.String |
getLastModifiedTime()
Returns the time at which the file representing the unit was last modified. |
IRPCollection |
getNestedSaveUnits()
Returns a collection of any sub-elements of the unit that were saved as individual files. |
int |
getNestedSaveUnitsCount()
Returns the number of sub-elements of the unit that were saved as individual files. |
IRPCollection |
getStructureDiagrams()
Returns a collection of any structure diagrams that are sub-elements of the unit. |
int |
isReadOnly()
Checks whether the file used to store the unit is read-only. |
int |
isReferenceUnit()
Checks whether the unit was added to the model as a reference. |
int |
isSeparateSaveUnit()
Checks whether the current IRPUnit object is saved in its own file. |
IRPUnit |
load(int withSubs)
Loads the unit. |
IRPUnit |
moveToAnotherProjectLeaveAReference(IRPModelElement parentInTarget)
Moves the unit to a different project, and adds a reference to it in the original project. |
IRPUnit |
referenceToAnotherProject(IRPModelElement parentInTarget)
Creates a reference to the unit in a different project. |
void |
save(int withSubs)
Saves the unit. |
void |
setCMHeader(java.lang.String cMHeader)
Sets the Configuration Management tool header for the unit. |
void |
setFilename(java.lang.String filename)
Specifies the name that should be used for the file representing the unit. |
void |
setIncludeInNextLoad(int includeInNextLoad)
Toggles whether the unit is going to be loaded the next time the model is loaded. |
void |
setLanguage(java.lang.String newLanguage,
int recursive)
Specifies the programming language that should be used when code is generated for the unit. |
void |
setReadOnly(int pVal)
Toggles the read-only status of the file used to store the unit. |
void |
setSeparateSaveUnit(int pVal)
Specifies whether the current IRPUnit object should be saved in its own file. |
void |
setUnitPath(java.lang.String newPath)
Specifies the path that should be used to locate the unit when it is added to a model "By Reference". |
void |
unload()
Unloads the unit. |
Methods inherited from interface com.telelogic.rhapsody.core.IRPModelElement |
addAssociation, addDependency, addDependencyBetween, addDependencyTo, addLinkToElement, addNewAggr, addProperty, addRedefines, addRemoteDependencyTo, addSpecificStereotype, addStereotype, becomeTemplateInstantiationOf, changeTo, clone, createOSLCLink, deleteDependency, deleteFromProject, deleteOSLCLink, errorMessage, findElementsByFullName, findNestedElement, findNestedElementRecursive, getAllTags, getAnnotations, getAssociationClasses, getBinaryID, getConstraints, getConstraintsByHim, getControlledFiles, getDecorationStyle, getDependencies, getDescription, getDescriptionHTML, getDescriptionPlainText, getDescriptionRTF, getDisplayName, getDisplayNameRTF, getErrorMessage, getFullPathName, getFullPathNameIn, getGUID, getHyperLinks, getIconFileName, getInterfaceName, getIsExternal, getIsOfMetaClass, getIsShowDisplayName, getIsUnresolved, getLocalTags, getMainDiagram, getMetaClass, getName, getNestedElements, getNestedElementsByMetaClass, getNestedElementsRecursive, getNewTermStereotype, getOfTemplate, getOSLCLinks, getOverlayIconFileName, getOverriddenProperties, getOverriddenPropertiesByPattern, getOwnedDependencies, getOwner, getProject, getPropertyValue, getPropertyValueConditional, getPropertyValueConditionalExplicit, getPropertyValueExplicit, getRedefines, getReferences, getRemoteDependencies, getRemoteURI, getRequirementTraceabilityHandle, getSaveUnit, getStereotype, getStereotypes, getTag, getTemplateParameters, getTi, getToolTipHTML, getUserDefinedMetaClass, hasNestedElements, hasPanelWidget, highLightElement, isATemplate, isDescriptionRTF, isDisplayNameRTF, isModified, isRemote, locateInBrowser, lockOnDesignManager, openFeaturesDialog, removeProperty, removeRedefines, removeStereotype, setDecorationStyle, setDescription, setDescriptionAndHyperlinks, setDescriptionHTML, setDescriptionRTF, setDisplayName, setDisplayNameRTF, setGUID, setIsShowDisplayName, setMainDiagram, setName, setOfTemplate, setOwner, setPropertyValue, setRequirementTraceabilityHandle, setStereotype, setTagContextValue, setTagElementValue, setTagValue, setTi, synchronizeTemplateInstantiation, unlockOnDesignManager |
copyToAnotherProject
IRPUnit copyToAnotherProject(IRPModelElement parentInTarget)
- Makes an editable copy of the unit in a different project.
- Parameters:
parentInTarget
- the model element that will be the parent of the new unit in the target project
- Returns:
- the editable unit that was created in the target project
getAddToModelMode
int getAddToModelMode()
- Returns an indication of how the unit was added to the model. See
IRPApplication.AddToModel_Mode
for the possible values.
- Returns:
- indication of how the unit was added to the model
getCMHeader
java.lang.String getCMHeader()
- Returns the header used by the Configuration Management tool for the unit.
- Returns:
- the header used by the Configuration Management tool for the unit
getCMState
int getCMState()
- Returns the configuration management state of the unit.
- Returns:
- the configuration management state of the unit
getCurrentDirectory
java.lang.String getCurrentDirectory()
- Gets the name of the directory that contains the file used to store the unit. The string returned consists of the full path except for the name of the file itself.
- Returns:
- the name of the directory that contains the file used to store the unit
getFilename
java.lang.String getFilename()
- Gets the name of the file used to store the unit. The string returned consists only of the filename, not the entire path.
- Returns:
- the name of the file used to store the unit
getIncludeInNextLoad
int getIncludeInNextLoad()
- Checks whether the unit is going to be loaded the next time the model is loaded.
- Returns:
- 1 if the unit is going to be loaded the next time the model is loaded, 0 if the unit is not going to be loaded
getIsStub
int getIsStub()
- Checks whether the unit is currently unloaded.
- Returns:
- 1 if the unit is not currently loaded, 0 if it is currently loaded
getLanguage
java.lang.String getLanguage()
- Gets the language of the unit.
- Returns:
- the language of the unit
getLastModifiedTime
java.lang.String getLastModifiedTime()
- Returns the time at which the file representing the unit was last modified.
- Returns:
- the time at which the file representing the unit was last modified
getNestedSaveUnits
IRPCollection getNestedSaveUnits()
- Returns a collection of any sub-elements of the unit that were saved as individual files.
- Returns:
- any sub-elements of the unit that were saved as individual files
getNestedSaveUnitsCount
int getNestedSaveUnitsCount()
- Returns the number of sub-elements of the unit that were saved as individual files.
- Returns:
- the number of sub-elements of the unit that were saved as individual files
getStructureDiagrams
IRPCollection getStructureDiagrams()
- Returns a collection of any structure diagrams that are sub-elements of the unit. Used primarily for structure diagrams that belong to individual classes.
- Returns:
- any structure diagrams that are sub-elements of the unit
isReadOnly
int isReadOnly()
- Checks whether the file used to store the unit is read-only.
- Returns:
- 1 if the file is read-only, 0 if the file is not read-only
isReferenceUnit
int isReferenceUnit()
- Checks whether the unit was added to the model as a reference.
- Returns:
- 1 if the unit was added to the model as a reference, 0 if it was not added as a reference
isSeparateSaveUnit
int isSeparateSaveUnit()
- Checks whether the current IRPUnit object is saved in its own file. (Keep in mind that IRPUnit objects represent any element that can in theory be saved as a separate file, even if this is not the case for a specific element in your model.)
- Returns:
- 1 if the unit is saved in its own file, 0 otherwise
load
IRPUnit load(int withSubs)
- Loads the unit.
- Parameters:
withSubs
- indication of whether the unit's subunits should be loaded as well (1 to load the subunits as well, 0 to load only the unit itself)
- Returns:
- the unit that was loaded
moveToAnotherProjectLeaveAReference
IRPUnit moveToAnotherProjectLeaveAReference(IRPModelElement parentInTarget)
- Moves the unit to a different project, and adds a reference to it in the original project.
- Parameters:
parentInTarget
- the model element that will be the parent of the new unit in the target project
- Returns:
- the editable unit that was created in the target project
referenceToAnotherProject
IRPUnit referenceToAnotherProject(IRPModelElement parentInTarget)
- Creates a reference to the unit in a different project.
- Parameters:
parentInTarget
- the model element that will be the parent of the reference (read-only) unit created in the target project
- Returns:
- the reference (read-only) unit that was created in the target project
save
void save(int withSubs)
- Saves the unit.
- Parameters:
withSubs
- indication of whether the unit's subunits should be saved as well (1 to save the subunits as well, 0 to save only the unit itself)
setCMHeader
void setCMHeader(java.lang.String cMHeader)
- Sets the Configuration Management tool header for the unit.
- Parameters:
cMHeader
- the Configuration Management tool header to use for the unit
setFilename
void setFilename(java.lang.String filename)
- Specifies the name that should be used for the file representing the unit. The string should only include the first part of the filename, Rational Rhapsody handles the file extension. (Note that if you change the filename, the old file remains on disk.)
- Parameters:
filename
- the name that should be used for the file representing the unit
setIncludeInNextLoad
void setIncludeInNextLoad(int includeInNextLoad)
- Toggles whether the unit is going to be loaded the next time the model is loaded.
- Parameters:
includeInNextLoad
- Use 1 to specify that the unit should be loaded the next time the model is loaded, 0 to specify that the unit should not be loaded
setLanguage
void setLanguage(java.lang.String newLanguage,
int recursive)
- Specifies the programming language that should be used when code is generated for the unit. This method can be used for mixed-language models.
- Parameters:
newLanguage
- use one of the following strings: C++ or cpp, C, Java, Ada, C#recursive
- use 1 if you want to set the language for all subunits of the element, otherwise use 0
jeepUnit.setLanguage("cpp", 0);
setReadOnly
void setReadOnly(int pVal)
- Toggles the read-only status of the file used to store the unit.
- Parameters:
pVal
- Use 1 to change the file to read-only, 0 to change the file to read/write
setSeparateSaveUnit
void setSeparateSaveUnit(int pVal)
- Specifies whether the current IRPUnit object should be saved in its own file. (Keep in mind that IRPUnit objects represent any element that can in theory be saved as a separate file, even if this is not the case for a specific element in your model.)
- Parameters:
pVal
- Use 1 to specify that the element should be saved in its own file. Use 0 to specify that the element should not be saved in its own file
setUnitPath
void setUnitPath(java.lang.String newPath)
- Specifies the path that should be used to locate the unit when it is added to a model "By Reference".
- Parameters:
newPath
- the path that should be used to locate the unit when it is added to a model "By Reference"
unload
void unload()
- Unloads the unit.