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


public interface DesignerProject

This object represents a Lotus Notes/Domino application (or in the Eclipse terminology, project). It does not extend IProject (but you can get the IProject from it or vice versa).


Method Summary
 java.lang.String getDatabaseName()
          The filepath of the application.
 java.lang.String getDatabaseTitle()
          The title is an attribute of the application, and can contain any characters.
 DesignerDesignElement getDesignElement(org.eclipse.core.runtime.IPath path)
          If you know or can invent the path of a design element you think exists, this returns a "handle" to the design element that can be used to read and set its properties.
 DesignerDesignElement[] getDesignElements(java.lang.String designElementTypeID)
           
 FacesRegistry getFacesRegistry()
          THIS IS A BETA LEVEL API AND IS SUBJECT TO CHANGE!

Returns an instance of the FacesRegistry that describes the current application.
The FacesRegistry contains all of the meta information relating to a particular application and the XPages runtime.
 org.eclipse.core.resources.IFile[] getFilesOfType(java.lang.String designElementTypeID)
          Returns an array of type IFile which represents the design elements of the specified type.
 java.lang.String getInheritTemplateName()
          Returns which template this application inherits its design from.
 java.lang.String getMasterTemplateName()
          If application is a template, the "template name" by which other applications can inherit its design (null = none).
 org.eclipse.core.resources.IProject getProject()
          The IProject object allows access to properties which are common to all projects, such as the Eclipse path of the project.
 java.lang.String getProjectNotesURL()
          Returns the Notes URL of the application, which is useful in Composite Applications etc.
 java.lang.String getReplicaId()
          The replica ID is a 16-hex-digit string, useful for locating replicas of the application on other servers or for concocting non-server-specific URIs of the application.
 java.lang.String getServerCommonName()
          Retrieves the server "common name", or null for a local application.
 java.lang.String getServerName()
          Retrieves the fully-qualified, abbreviated server name, or null for a local application.
 org.eclipse.core.resources.IFolder getWebContentFolder()
          Returns the IFolder reference to Web Content Folder within the nsf, which is not visible in the navigator UI, but where XPage compilation stores various files resulting from the build process.
 void initialize()
          Ensure that the project is fully loaded into Eclipse, so that all resources can be found if they're in there.
 boolean isDesignHidden()
          A "hidden" design has all the source code stripped out of it, and the user isn't allowed to edit it in Domino Designer.
 boolean isDesignLockingAllowed()
          A database option controlling whether design elements are "locked" when someone starts editing them, to prevent simultaneous edits.
 boolean isInheritTemplate()
          True if the design of the application is "inherited" from a template.
 boolean isMultiLingual()
          A multilingual application can potentially contain multiple design elements with the same alias, one for each language the application supports.
 boolean isProjectAccessible()
          Has the project been initialized for use in this session? "Accessible" in this context doesn't mean whether the user has access to it.
 java.lang.String notesDbExists()
          Tells whether the application referred to by the project actually exists and is available.
 void refresh()
          Update the UI to reflect recent changes to design elements or properties.
 void setInheritTemplateName(java.lang.String inheritTemplateName)
          Change which template this application inherits its design from; null or "" = does not inherit.
 void setMasterTemplateName(java.lang.String masterTemplatename)
          Assign the "template ID" which identifies this application as a template.
 void setTitle(java.lang.String dbtitle)
          Sets the database title.
 

Method Detail

getServerName

java.lang.String getServerName()
Retrieves the fully-qualified, abbreviated server name, or null for a local application.

Returns:
server name e.g. "CN=Rex/O=YourCo", or null for local app.

getServerCommonName

java.lang.String getServerCommonName()
Retrieves the server "common name", or null for a local application. The common name is the part following "CN=" in the fully qualified name, and may not be unique (thus, is not always usable) though it normally is, within an organization.

Returns:
server common name, e.g. "Rex".

getReplicaId

java.lang.String getReplicaId()
The replica ID is a 16-hex-digit string, useful for locating replicas of the application on other servers or for concocting non-server-specific URIs of the application.

Returns:
the replica id for the db

getDatabaseName

java.lang.String getDatabaseName()
The filepath of the application. Sample value: "pubs\pubDisc.nsf". The path is relative to the Notes data directory for a server application. For a local application, you may get the full path here ("C:\..."). This is the value you would use, in combination with the server name, to open the application via an alternate API (e.g. the lotus.domino.* classes) or to locate it in the file system.

Returns:
the path to the db

getDatabaseTitle

java.lang.String getDatabaseTitle()
The title is an attribute of the application, and can contain any characters. This is not the same as the "name" of the application, which must be a valid file path. Sample value: "Publications Discussion"

Returns:
the db title

setTitle

void setTitle(java.lang.String dbtitle)
              throws DesignerException
Sets the database title. The title can contain any characters. It's only used for display; not for finding the application.

Parameters:
new - database title. Null and "" are not legal values.
dbtitle - the new title of the db
Throws:
DesignerException

isDesignLockingAllowed

boolean isDesignLockingAllowed()
A database option controlling whether design elements are "locked" when someone starts editing them, to prevent simultaneous edits.

Returns:
returns true if design locking has been enabled for the database

notesDbExists

java.lang.String notesDbExists()
Tells whether the application referred to by the project actually exists and is available. If unavailable, it may have been deleted since the bookmark was created, or server might be down, etc. This property tells us whether the application is really there.
Because the database can be on a server and the server might not be available, the test might fail for reasons other than the database actually not existing, hence the message.

Returns:
null if application exists, otherwise a string (message) describing the error.

isProjectAccessible

boolean isProjectAccessible()
Has the project been initialized for use in this session? "Accessible" in this context doesn't mean whether the user has access to it. It refers to whether the project has been "opened" and its contents examined during the current session. See initialize() method.

Returns:
returns true if the db can be accessed
See Also:
initialize()

isMultiLingual

boolean isMultiLingual()
A multilingual application can potentially contain multiple design elements with the same alias, one for each language the application supports.

Returns:
returns true if the db is a multilingual one

isInheritTemplate

boolean isInheritTemplate()
True if the design of the application is "inherited" from a template. If this is true, any changes you make to design elements are likely to be overwritten when the automatic design refresh occurs on the server (on most servers, this occurs nightly). Specific design elements can be exempted from refresh by setting their "prohibit refresh" property. There's no setter, because you affect this property indirectly by calling setInheritTemplateName.

Returns:
true if the design of the application is "inherited" from a template
See Also:
setInheritTemplateName(java.lang.String)

isDesignHidden

boolean isDesignHidden()
A "hidden" design has all the source code stripped out of it, and the user isn't allowed to edit it in Domino Designer. Generally, users can't create a bookmark to an application whose design is hidden, but the bookmark might be left over from before the hiding occurred. Before you let the user change any of the design attributes of the application or its design elements, or before you display information, you might check this flag.

Returns:
returns true if the design is hidden

getWebContentFolder

org.eclipse.core.resources.IFolder getWebContentFolder()
Returns the IFolder reference to Web Content Folder within the nsf, which is not visible in the navigator UI, but where XPage compilation stores various files resulting from the build process. Web content folder is referenced by XPage runtime. Plugins might possibly want to add some of their own files here, or scan the properties files and so forth to be found here.


getProject

org.eclipse.core.resources.IProject getProject()
The IProject object allows access to properties which are common to all projects, such as the Eclipse path of the project. For Eclipse documentation please refer to this site:
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IProject.html

Returns:
returns the Eclipse representation of the DB.
See Also:
IProject

getProjectNotesURL

java.lang.String getProjectNotesURL()
                                    throws DesignerException
Returns the Notes URL of the application, which is useful in Composite Applications etc. This may fail, returning null, because of errors accessing the application.

Returns:
returns a URL that Notes can use to access the db
Throws:
DesignerException

refresh

void refresh()
             throws DesignerException
Update the UI to reflect recent changes to design elements or properties. This is necessary even if the changes were made via this API. If you have several changes to make, make them all and then refresh the 'DesignerProject'. This will give better performance than if the display refreshed automatically after every change.

This can be an expensive operation depending on the size of the database/template, and also depending on the network speed.

Throws:
DesignerException

getDesignElement

DesignerDesignElement getDesignElement(org.eclipse.core.runtime.IPath path)
If you know or can invent the path of a design element you think exists, this returns a "handle" to the design element that can be used to read and set its properties. Note the database must be "accessible" before you can search for IPaths in it.

Parameters:
path - the location of the design element
Returns:
returns the design element at the given path
See Also:
isProjectAccessible(), initialize()

initialize

void initialize()
                throws DesignerException
Ensure that the project is fully loaded into Eclipse, so that all resources can be found if they're in there. Call after checking isProjectAccessible. It does no harm to proactively initialize an application you're about to access; if it's already initialized nothing happens. If your selection includes design elements, the project containing the design elements is already initialized.

Throws:
DesignerException

getMasterTemplateName

java.lang.String getMasterTemplateName()
                                       throws DesignerException
If application is a template, the "template name" by which other applications can inherit its design (null = none).

Note: By convention, the .ntf file suffix indicates a template, but a .nsf file can also have a non-blank value for this property, or a .ntf file can lack it.

Returns:
null if not a template, else template ID.
Throws:
DesignerException

setMasterTemplateName

void setMasterTemplateName(java.lang.String masterTemplatename)
                           throws DesignerException
Assign the "template ID" which identifies this application as a template. Other applications use this ID to refer to a template and inherit its design.

Note: By convention, the .ntf file suffix indicates a template, but a .nsf file can also have a non-blank value for this property, or a .ntf file can lack it. Nothing is done at this stage to force the ID to be unique.

Parameters:
masterTemplatename - null or "" (empty string) to clear the value, else any string to be the unique ID for this template.
Throws:
DesignerException

getInheritTemplateName

java.lang.String getInheritTemplateName()
                                        throws DesignerException
Returns which template this application inherits its design from.

Returns:
returns the name of the template from which this db inherits its design (may be null)
Throws:
DesignerException
See Also:
getMasterTemplateName()

setInheritTemplateName

void setInheritTemplateName(java.lang.String inheritTemplateName)
                            throws DesignerException
Change which template this application inherits its design from; null or "" = does not inherit.

Parameters:
inheritTemplateName - the name of the template from which this one is to inherit its design
Throws:
DesignerException

getFilesOfType

org.eclipse.core.resources.IFile[] getFilesOfType(java.lang.String designElementTypeID)
Returns an array of type IFile which represents the design elements of the specified type. For more information on the possible values of designElementTypeID please refer to the string constants defined in DesignerResource

Parameters:
designElementTypeID - - A java.util.String constant which represents the ID of the type of Design Element which you wish to lookup.
Returns:
an array of type IFile. The elements in the array are the Eclipse File System representation of the Domino Designer Design Elements.

getFacesRegistry

FacesRegistry getFacesRegistry()
THIS IS A BETA LEVEL API AND IS SUBJECT TO CHANGE!

Returns an instance of the FacesRegistry that describes the current application.
The FacesRegistry contains all of the meta information relating to a particular application and the XPages runtime.

Returns:
FacesRegistry
See Also:
FacesRegistry

getDesignElements

DesignerDesignElement[] getDesignElements(java.lang.String designElementTypeID)