com.ibm.designer.domino.ide.resources.extensions
Interface DesignerDesignElement


public interface DesignerDesignElement

Represents one design element, either in a selection or that has been retrieved using the IResource of the design element. Changes to design element properties do not, as a rule, appear in the Designer UI immediately; use the refresh method to make them display. This class is somewhat parallel to some classes in lotus.domino package: Document, Form, View, etc. However, this is used to operate on the design elements as they appear in the Designer UI, so it is in some sense the "front end" version of these classes.


Method Summary
 java.lang.String getAlias()
          A design element may have no aliases (return value null) or it may have one, or more than one delimited with "|" (vertical bar).
 java.lang.String getAuthor()
          Name of person who last modified the design element; same value that appears in the "Last Modified By" column of the design list.
 java.lang.String getComment()
          This value appears in the Comment column of the design element list.
 java.lang.String getDesignElementType()
          Returns a string saying what type of design element this is -- form, view, xpage, etc.
 java.lang.String getLanguage()
          If the application is multilingual, this is the language of the design element (if the language has been specified).
 java.util.Date getLastModifiedDate()
          This value appears in the "Last Modified" column of the design list.
 java.lang.String getName()
          The design element name is the value that appears in the Name column of the design element list.
 int getNoteId()
          The noteID identifies the design element within the particular replica of the application.
 java.lang.String getNotesURL()
          The Notes URL can be used to open the design element in Designer or Notes (depending what command you add to the end), or to refer to it in a composite application.
 org.eclipse.core.resources.IResource getResource()
          IResource is a generic Eclipse object used to represent anything that can appear in a project.
 java.lang.String getTemplateName()
          If not null, this design element inherits its design from a template, which might be different from the template that controls the rest of the design (if any).
 boolean isProhibitRefresh()
          A flag to indicate whether the design element will be affected by design refresh or replace from a template.
 void recycle()
          If you've grabbed a design element that's not in the selection, and you want to release its memory explicitly.
 void refresh()
          Call this method after performing set operation(s) on design element(s) to update the UI.
 void setAlias(java.lang.String name)
          Set the alias or aliases of the design element to the specified value.
 void setComment(java.lang.String comment)
          Set a comment for the developer/maintainer.
 void setName(java.lang.String name)
          Set the title of a design element.
 void setProhibitRefresh(boolean flag)
          Set whether the design element can be affected by a template refresh.
 void setTemplateName(java.lang.String name)
          Use this method for changing inherit design element template name property.
 void sign()
          Refresh the signature of the design element using the current userid as the signer.
 

Method Detail

getName

java.lang.String getName()
The design element name is the value that appears in the Name column of the design element list.

Returns:
should never be blank.

setName

void setName(java.lang.String name)
             throws DesignerException
Set the title of a design element. This is the text that appears in the Name column of design element lists and as the name in the Designer navigator. This call may be ignored if the design element is of a type that doesn't let you set the name, e.g. "About document." Do not use this method to set name and alias; the alias should be set separately using setAlias. Certain types of design elements have expected suffixes, e.g. ".xsp" for an XPage. This method does not automatically add the appropriate suffix; that's up to you.

Parameters:
name - if null or "", no effect -- these are not legal names.
Throws:
DesignerException

getAlias

java.lang.String getAlias()
A design element may have no aliases (return value null) or it may have one, or more than one delimited with "|" (vertical bar).

Returns:
may be null if the design element has no alias.

setAlias

void setAlias(java.lang.String name)
              throws DesignerException
Set the alias or aliases of the design element to the specified value. Note: Not all design elements use aliases normally. Exercise good sense. It's unusual for design elements to have more than one alias, but can occur e.g. where two forms have been merged into one and you want to use the one for documents containing either of the old aliases.

Parameters:
name - A string delimited by "|" listing the aliases you want to assign. May be null or "" to clear aliases.
Throws:
DesignerException

getComment

java.lang.String getComment()
This value appears in the Comment column of the design element list. It has no functional purpose; just a comment for the developer's benefit.

Returns:
null if the comment is blank.

setComment

void setComment(java.lang.String comment)
                throws DesignerException
Set a comment for the developer/maintainer. Not all design elements allow the comemnt to be set; e.g. About Document will refuse to allow this.

Parameters:
comment - new comment, null or "" to clear.
Throws:
DesignerException

getNoteId

int getNoteId()
The noteID identifies the design element within the particular replica of the application. In other replicas, the same design element may have a different ID. The Universal ID is the same in all replicas, but is not directly available through this API -- however, see getNotesURL).

Returns:
noteID, may be negative in apps with DECS/LEI activities, indicating virtual document.
See Also:
getNotesURL()

getLastModifiedDate

java.util.Date getLastModifiedDate()
This value appears in the "Last Modified" column of the design list. It's automatically assigned by the system, so no "set" method.

Returns:
the date the item was last modified

getAuthor

java.lang.String getAuthor()
Name of person who last modified the design element; same value that appears in the "Last Modified By" column of the design list. As it's automatically assigned by the system, there is no "set" method.

Returns:
returns the name of the author of the Design Element

getNotesURL

java.lang.String getNotesURL()
                             throws DesignerException
The Notes URL can be used to open the design element in Designer or Notes (depending what command you add to the end), or to refer to it in a composite application. Note that the last part of the Notes URL is the design element UNID.

Returns:
a string of the form "notes://something".
Throws:
DesignerException

getResource

org.eclipse.core.resources.IResource getResource()
IResource is a generic Eclipse object used to represent anything that can appear in a project. This object provides access to information about the design element that's not specific to design elements, such as its contents (for a file-type design element such as Image).

Returns:
returns the Eclipse representation of the Design Element
See Also:
IResource

getLanguage

java.lang.String getLanguage()
If the application is multilingual, this is the language of the design element (if the language has been specified). Example value: "en-us".

Returns:
null if app is not multilingual or no language was specified.

getDesignElementType

java.lang.String getDesignElementType()
Returns a string saying what type of design element this is -- form, view, xpage, etc. The string is a "metamodel ID" which is long and contains many dots. Note the return value is usually plural, e.g. "xxx...forms" not "xxx...form". The exact list of values is available as TYPE_constants in DesignerResource.

Returns:
returns an id representing the Design Element type
See Also:
TYPE_ABOUTDOC etc.

sign

void sign()
Refresh the signature of the design element using the current userid as the signer. This is necessary if you've made back-end modifications to the design element that affected "signed" fields. The design element will not be recognized by the Notes client unless it has a valid signature. It is not necessary to sign design elements after changing their properties using other methods of this class; that's done automatically.


isProhibitRefresh

boolean isProhibitRefresh()
A flag to indicate whether the design element will be affected by design refresh or replace from a template.

Returns:
returns true if the design element is not affected by design refresh

setProhibitRefresh

void setProhibitRefresh(boolean flag)
Set whether the design element can be affected by a template refresh. If false, the template name is also relevant.

Parameters:
flag -
See Also:
setTemplateName(String)

getTemplateName

java.lang.String getTemplateName()
If not null, this design element inherits its design from a template, which might be different from the template that controls the rest of the design (if any). The template name is neither the filepath, nor the title of the template ntf file, but a separate property (see references). NOTE: The design element may have no template name, but still inherit its design from a template, if the _application_ has a design template.

Returns:
null if no template name associated with the design element.
See Also:
DesignerProject.getMasterTemplateName(), isProhibitRefresh()

setTemplateName

void setTemplateName(java.lang.String name)
Use this method for changing inherit design element template name property. Use null or "" to clear. If non-null, the design element will individually inherit its design from the specified template, If you clear the template name from a design element where it was previously non-blank, the design element's inheritance characteristics will revert to the default for the application. regardless of what the rest of the application does. NOTE: the "prohibit refresh" flag and this value are mutually exclusive -- you can't prohibit refresh and specify a template to inherit from.

Parameters:
name - new value; null or "" to clear.
See Also:
setProhibitRefresh(boolean), DesignerProject.setInheritTemplateName(String)

refresh

void refresh()
Call this method after performing set operation(s) on design element(s) to update the UI. For efficiency, this doesn't happen automatically, so that you can perform multiple updates and then decide when to redisplay.


recycle

void recycle()
If you've grabbed a design element that's not in the selection, and you want to release its memory explicitly.