Method and system for compiling and using placebot agents for automatically accessing, processing, and managing the data in a place6744447Abstract Collaboration space object model provides for a place consisting of rooms created by users interacting with a client browser. A skin (i.e., theme) may be used as template for creating places. PlaceBots (i.e., agents) provide for accessing, processing and managing data in a place. HTML may be dragged and dropped into a place, where it is parsed and corresponding place fields created. MS Excel or Word documents may be dragged and dropped into a place, which creates a corresponding form, and users may create new documents using that form. A place type comprising a template of an entire place, or collaboration space, may be used to create new places. Changes made to a place may be reported, subject to security controls, by selecting what's new. Task fields are provided allowing web browser creation of forms for work flow. Place enabled objects are provided for synchronous communications. A quick browse feature provides a simplified format for browser windows based on selection of HTML links. MS Office documents may launched within a place for in place editing and importing the resulting document into the place. Claims We claim: Description BACKGROUND OF THE INVENTION
TABLE 1
QUICKPLACE OBJECTS AND DOMINO EQUIVALENT
QuickPlace Object Domino Equivalent
QuickPlace Server File Directory
Place File Directory
Page Data Note, Form & Subform
PlaceBot Domino Agent
Theme Data Note
Member Data Note in Contacts1.nsf
Subroom * NSF Database
SubroomTheme Data Note
SubroomMember Data Note in Contacts1.nsf
Room NSF Database
Folder / TOC Folder or View
Form Data Note
Field Data Note
* Subrooms contain their own set of Folder, Page, Form, Field, PlaceBot &
Subroom Objects
QuickPlace Server 170 is a file directory containing all Places and Resources. The Domino equivalent is a file directory 202 named "quickplace". This identifies the main folder 176 for a QuickPlace server 170. If the QPServer 170 is running as a stand alone, this folder will be in the QuickPlace data folder. For example D:.backslash.QuickPlace.backslash.Data.backslash.quickplace. If the QPServer 170 is running on top of a Domino server the folder will be the Domino Data folder. For example D:.backslash.Lotus.backslash.Domino.backslash.Data.backslash.quickplace. To locate QuickPlace Server 170 in PlaceBots and get access to all of its databases, a LotusScript method GetDbServer is executed together with a test that the Path to databases starts with "QuickPlace". Place Object Place object 172 is a directory in the "QuickPlace" directory grouping resources for a Place. The Domino equivalent is a file directory bearing the name of the QuickPlace. Place object 172 is a directory that brings together a Place for organizational purposes. It also identifies the NSFs 114 as belonging to the place 172 by bearing the name of the QuickPlace. As distinguished from a place object 172, the main room 174 in a QuickPlace is a database called Main.nsf. Place object 172 groups and identifies the Main.nsf resources for the Place and any subrooms 194 in the Place. Place object 172 contains several files. There is a Main.nsf, Contactsl.nsf and a Search.nsf file. If the QuickPlace has a Subroom 194 there will also be an NSF file with its name starting with "PageLibrary". Each of these page library files is a Room 174. The place object in PlaceBots 184: place object (directory) 172, contains the databases which form a place. When writing PlaceBots, one can search for this directory by using the name of the QuickPlace. In this directory will be found all the databases will belong to that place 172. This file directory's name is the name of the QuickPlace. For example, if the QuickPlace is called "Millennia", this directory has the following path within the QuickPlace server 170: .backslash.millennia To find the place object 172 for the Millennia Place in LotusScript the script procedure of Table 2 may be used:
TABLE 2
SCRIPT PROCEDURE FOR FINDING A PLACE
Dim ndbPlace As NotesDatabase
Set dirPlace = New NotesDbDirectory( g_sServerName )
Set ndbPlace = dirPlace.GetFirstDatabase( DATABASE )
sNdbPlaceFilepath = ndbPlace.FilePath
If Instr(1, Lcase( sNdbPlaceFilepath ),
.vertline.quickplace.backslash.millennia.vertline. ) Then
`//the Place is found
Room object 174 is the main container for a Place, containing a collection of pages and tools. The Domino Equivalent an NSF Database. The room 174 is the main container for a QuickPlace's content. For example, when using the Millennia Place, most of what is seen is contained in the Room object. The Room object is always called Main.nsf, and holds folders 176 and pages 182 for the QuickPlace, as well as managing links to any subrooms 194 in the place object 172. Room object 174 uses elements held in other databases. For example many of the standard images QuickPlace displays are in a resources object (not shown). Each room 174 has its own security and authentication, and the information required to do this is contained in databases such as Contacts1.nsf. A room 174 breaks down a place 172 into smaller areas to help define structure. Each room 174 has its own security and authentication. This allows separate user groups. It also means that subrooms 194 can be created for separate projects, forming a separate shared space. The room object 174 then forms a common entry point where shared resources can be stored. The room object in PlaceBots: to locate a room 174, one looks in the main QuickPlace Server 170 directory, then looks into the room object (a directory bearing the name of the QuickPlace), then looks for a database called "Main.nsf". Returning to previous LotusScript example of locating a Place 172 (Table 2), the match string can be extended from "quickplace.backslash.millennia" to "quickplace.backslash.millennia.backslash.main.nsf" to find the room object 174, as set forth in Table 3.
TABLE 3
SCRIPT PROCEDURE TO FIND A ROOM OBJECT
Set dirPlace = New NotesDbDirectory( g_sServerName )
Set ndbPlace = dirPlace.GetFirstDatabase( DATABASE )
sNdbPlaceFilepath = ndbPlace.FilePath
If Instr(1, Lcase( sNdbPlaceFilepath ),
.vertline.quickplace.backslash.millennia.backslash.main.nsf.vertline.
) Then
`//the Room id found.
To access elements contained in a room 174, the views and folders 176 in the room are accessed. For example to find the elements visible in the Table Of Contents (TOC), the "h_TOC" view is used. The Room object 174 in HTML is visible in URLs as the "main.nsf". To access room object 174 most easily, a relative path is used from the current object if it is in the same Place 172. For example, when creating a URL link from a subroom 194 to a room 174, the URL begins as follows: <a href="../.. /Main.nsf/ where the "dot dot slash dot dot slash" syntax is a part of the URL, not an abbreviation for this example. Using this relative URL makes the URL more robust. In other words, this URL can be used to find the (Main.nsf) room 174 for any place 172. Room fields 180 used to define rooms 174 are set forth in Table 4.
TABLE 4
FIELDS DEFINING ROOMS
Field Name Description
h_HaikuName The name of this Place
h_AreaType The name of the template used to create
this room.
h_AreaParent The name of the parent database
h_ShowSecurity If h_SetSecurity = 1, the QuickPlace
server sets h_ShowSecurity to 1.
h_SetCalendar Determines if the Calendar will be
visible in a Room. If the field has the
value of "1" a link to the Calendar will
be displayed in the sidebar
h_SetSecurity This field works in conjunction with the
h_ShowSecurity field. It is only valid
for Readers and Authors, because
Managers must always be able to edit
security of a Room. If the field is set
to "1" a link to the Security page will
be displayed in the sidebar for Readers
and Authors (if they select Security in
this case they will see only their own
information)
h_MailDb The name of the database that receives
email addressed to this Place.
Folder Object A folder object 176 is an object for indexing content, grouping related pages 182, and dividing a room 174 into sections without imposing new security. The Domino equivalent is Notes folder or view 206, and Notes folders 206 have three functions. For the user, they provide a logical grouping of related documents. This makes it easier for the user to find documents, and allows people with a shared interest to work an area of a QuickPlace. The other way of using folders is in the user interface, or "User" folders. Within user folders there are seven different types: 1. Standard List 2. Headline 3. Slide Show 4. Response List 5. Ordered List 6. Table Of Contents 7. Index Folder types 1 to 5 are all available as styles for new, custom folders. From the a site manager's perspective, a Folder allows a QuickPlace to be divided into areas for separate groups of people, without having to be concerned about access control which would be necessary if a Subroom 194 were used. Fields Include the Following: "h_LastAttachmentDirectory": used when getting attachments. This field enables users to quickly upload attachments. For example, each time a Layout file is uploaded, QuickPlace knows where to go looking for the file. This path information is sourced from this field. "h_DirtyAesthetics Number": indicates which items should be checked (once a part of the aesthetics has been tweaked, a check mark indicates that the part has been changed). h_AreaHasAesthetics: indicates if a Room has its own aesthetic settings enabled. If the field value is "1" the Room has had the aesthetics tweaked. The third way that folders 176 are used is to allow developers to locate elements in a QuickPlace. To a developer, folders are indexes that allow look ups, therefore giving programmatic access to elements. When any page renders in a Browser, the time it takes to render is directly dependant on the amount of information to be downloaded. The amount of information required to render a Folder is less than for a Page. When Pages appear in Edit mode, there is yet more information required to render it. Therefore, the quickest load time for a QuickPlace by first using a folder 176 as the first page the user sees when upon selecting a place. Once users have visited a folder 176, a subset of the resources used to render a page 182 will already have been downloaded. The folders used by developers are slightly different than the folders users would use. The h_Index lists the published pages in the Place and appears as the standard index of a Place, and the h_TOC is the table of contents list. Some of the folders in look ups by developers are set forth in Table 5.
TABLE 5
VIEWS USED TO REFERENCE OBJECTS
View Name Description
h_Index Provides a list of all published Pages
in a Room, listed by h_UNID, the unique
identifier for a Page. Lists all
published items in a Room, this not only
includes Pages but all of the Objects in
a Place. For example, Pages, PlaceBots,
Fields, Skins and Forms.
h_QDK Every Design Note in a Place. The h_QDK
view contains a form formula to open
different documents using different
forms. For example: If the field
"h_Type" is "0" then use the form named
"h_Page". The result of this form
formula is that the QDK view allows
developers to inspect the properties of
some Design Notes. The supported types
are: "h_Page", "h_Folder", "h_Room",
"h_SubRoom", "h_Error" and "h_RoomType".
h_TOC List of all items displayed in the Table
Of Contents. Items must have the
"h_IsInTOC" field with a value of "1"
and be published with no
replication-save conflict.
(All) Every item in the Room. Sorted by the
h_Name field: the readable name of the
item. For example "Welcome",
representing the default Welcome page.
The Place Object in PlaceBots: Internally, default QuickPlace Folders have readable titles. For example the response folder discussion" has the internal name of "h_Discussion" in the "h_SysName" field. A new response list style folder is called "SchwatzRaum" (which means "chat room" in German). The internal name of the SchwatzRaum Folder is: "h_F49791727035ACD1C12569510063087C" (which means "h_F49791727035ACD1C12569510063087C" in German). This unique identifier can be used in PlaceBots to locate the Folder. A lookup can be done in the "h_Folders" view of a QuickPlace to find the readable name of the folder. Another solution is to retrieve the name of the field by accessing the value in the h_SysName field. The Table of contents and the Index are special user Folders 176. Only one TOC and one h_Index exists per Room 174 or Subroom 194. They exist from the moment the Place or Room is instantiated. Folder Fields The following Fields are used to define data notes that render as Folders. Folders exist in a visible form within a QuickPlace. In other words they can be viewed by opening the NSF file in the Notes Client or Domino Designer. In conjunction with this view, a data note exists, providing information about that Domino View or Folder. Table 6 lists the fields are contained in the data note and provide information about the Domino View or Folder.
TABLE 6
FIELDS USED TO DEFINE FOLDERS
Field Name Description
h_FolderStyle When creating a new folder, one is given
the choice to create a new folder based
on a number of templates. This field
denotes which type of folder has been
created.
"1" = Standard List
"3" = Headline
"4" = Slide Show
"5" = Response List
"7" = Ordered List
h_FolderStorage The "internal" name of the folder, in
other words, the name by which it is
known to the system. The value of this
field is used in documents to tell
QuickPlace in which folder it should be
used.
h_CanAddPages When creating a new folder, the manger
is presented with the options, to the
question "Who can add pages to this
folder?". If only managers is chosen
the value of "0" is written to this
field. The default is " " which means all
authors can add pages to this folder.
Form Object A form object 178 is a document used to create new QuickPlace content. The Domino equivalent is a data note of type "h_Form". Form object 178 is a resource used to create, manage and display content, therefore defining the schema of the application. Forms contain fields to hold data, therefore creating and displaying content. Forms can also contain scripts within them to provide logic within the Page. For example, a form can contain form validation to make sure that a field contains only numbers. Forms can also initiate processes outside the page. This is done by creating a PlaceBot 184 and associating the PlaceBot with a Form 178. PlaceBots 184 are not contained by the Form but there is a association between them. Forms are created with the Domino Form "h_PageUI" with the field h_Type set to "h_Form". New forms 178 with custom structure and logic can be created by room managers. Form Fields Table 7 sets forth the fields 180 used to define the structure of a form 178.
TABLE 7
FIELDS USED TO DEFINE FORMS
Field Name Description
h_FormDescription The content of this field appears
as the description of the form
appearing in the "New" page.
h_WorkflowType Allows 1-4 approvers and some other
h_ApprovalCycle options. This is normally set to
"h_Standard".
h_EditorInChief Allows 1 approver and fewer
options.
h_MultipleEditors By setting this field, all members
of QP to edit pages created with
this form.
h_Standard None of the above.
h_SetPageComponent sView Should = h_FieldDefinitions
Field Object Field object 180 is used to construct (HTML formatted) input fields in forms 178. The Domino equivalent is a Data note of type "h_Field". Fields are constructed from the Domino Form "h_PageUI" with a the field h_Type set to "h_Field". QuickPlace field object 180 defines the structure of the container, not the content. The values contained in a page 182 are contained by the page, not the fields 180. The h_FieldType attribute to a field 180 determines what sort of field it is. This determines what the field will do when it is rendered in a browser. For example, a field 180 of type h_DateControl will provide the user with a date picker widget. Domino fields are used to define the attributes of QuickPlace fields 180 are set forth in Table 8. QuickPlace fields 180 are drawn to the screen as HTML, they are not created by a Domino Field in a Domino Form.
TABLE 8
FIELDS USED TO DEFINE FIELDS
Field Name Description
h_IsUser Defined h_True means this is a custom
form
h_PublishlnFolder UNID of the folder +".vertline." +
h_FolderStorage name of the folder
h_Name "Import" and is related to the
h_SystemName field which often has a
similar value such as "h_Import".
h_FieldLabel Instructional information that might be
useful for someone editing this field.
Similar to the Static h_FieldType.
Containing information to help the user,
but only displayed in edit mode." For
example: <script>
(h_CurrentSkinType ==
`h_Edit`)?"": C(self, `Note: Clicking
on the title of this page in its folder
or in the sidebar will open the page
that it points to. To edit the page
again later, click its title in the
Index.`) ;</script>"
h_ContainerUNlD The UNID of the Form which contains
this field. QuickPlace uses a Design Note
to create forms, each of these having an
internal name. The h_ContainerUNID
contains the internal name of one of
these QuickPlace Forms.
h_FieldType There are many different types of
Fields. The following types are listed
as examples to help understand how
Fields work in general.
"h_Attachments"= Enables the attaching of files.
"h_CalendarControl"= Includes date and time controls and
a duration field
"h_DateControl"= Date field with date picker widget
"h_DateTime"= Contains Date and Time information.
"h_DocAuthor"= Contains a Domino Heirachical name of
the original Author of the Document.
"h_DocCreated"= Creation date of the page.
"h_DocModified"= Modified date of the page.
"h_DocSize"= Size of the page.
"h_NamePopup"= Select listing members of the QuickPlace
"h_RichText"= Rich text field. Allowing editing via
the rich text editor applet.
"h_Serial"= A unique number to identify the
document.
"h_Static"= Static text, used to provide information
about the accompanying field. May also
include link to an image.
"h_Subject"= The Documents subject.
"h_TaskControl"= Used in the Task form to insert the task
control tool.
"h_TextInput"= Simple text equating to the "<input>"
field in HTML.
"h_TextPopup"= Text select list, equating to the
"<select><option>" in HTML.
"h_TimeControl"= Select lists for hours, minutes, AM/PM.
"h_CalendarControl"= Field containing control tool used
in the calendar field.
"h_CreateMSExcel"= Field enabling the upload of Excel
documents.
"h_CreateMSPowerPoint"= Field enabling the upload of
PowerPoint documents.
"h_CreateMSWord"= Field enabling the upload of Word
documents.
"h_Import"= Field enabling the upload of imported
documents such as HTML.
"h_MultipleImport"= Field enabling the upload of multiple
documents, such as a series of HTML
documents.
"h_NotifyIndicator"= Field indicating if members should
be notified of the creation of
content or their inclusion in the
Contacts1.nsf.
Page Object Page object 182 is a basic building block for content. The Domino equivalent is a data note, form and subform. Pages form the basic units of content, relying on the structure of QuickPlace to create, manage and render them in a Web browser. It differentiates structure and content cleanly. Notes structural elements such as Forms Views and so on provide structure, whereas Notes Documents provide pure data content. In the Domino environment the division between structure and content becomes blurred. This is because when the data in a document is being represented in a Web browser, it is possible to use the data to format itself using HTML. The data is able to start defining structure by creating HTML links, tables, references to images and so on. In the QuickPlace OM, the same is true. Pages can be created in a number of ways. Table 9 sets forth the fields used for defining page objects.
TABLE 9
FIELDS DEFINING PAGE OBJECTS
h_NotInSearch Having the value of "1" will exclude the
field from being included in a full text
search. This allows functional content
in fields such as JavaScript or static
text to evade returning a hit during
searching.
h_Position Indicates the fields position of
appearance in a form. Typically numbers
such as 100 are used.
h_FieldFormat "h_FieldFormat" indicates formatting
options, "h_All" "h_BannerOptional"
"h_BannerRequired"
h_BannerRequired Always display subject as a banner at
top of page
h_BannerOptional Allow user to choose banner or not
h_NoBanner Do not display the subject on the page
h_FieldIsRequired 1 = The field is required and the user
will be prompted if they do not fill it
out.
Page Fields Page Object in LotusScript and JavaScript: developers wanting to customize pages 182 will generally want to manipulate the page's field 180 values. Fields existing in a Page are generally rendered to the HTML document in the background as JavaScript variables. They are then visibly rendered via document.write( ) functions. If a field exists, it can be accessed in the browser via a variable with the same name as the field. The PageBody Field holds the main content or "body" of the page. Table 10 sets forth the fields 180 used to define page 182 documents in QuickPlaces.
TABLE 10
FIELDS USED TO DEFINE QUICKPLACE PAGES
Field Name Description
h_Form The QuickPlace form used to create this
page. This is not the Domino "Form"
field which denotes which form Domino
links the file to. The Domino "Form"
field will contain "h_PageUI" for
virtually all objects in a QuickPlace.
h_PageType This field is set to null when the
document is a visible document. Only
when the object is in design mode do the
other values appear:
"h_Response" the document is a response
to a topic document. This value is only
valid in response folders.
"h_Revision" this means that the
document is being revised, and is not
available for public access.
"h_Mail" means that the document is a
mail document, being either sent or
received by QuickPlace.
h_Originator The creator of this page. This field
contains a full hierarchical name, for
example: "CN=David Wyss/OU=
QuickPlaceName/OU= QP/O= ServerName".
All users have the second OU part of the
name set to QP. This is done so that
when QuickPlace is used on an Overlay
server (QuickPlace and Domino together)
QuickPlace can avoid conflicts between
Domino registered users and QuickPlace
users.
h_NameIsBanner Denotes if the page's name should be
displayed as a banner. If it is to be
displayed as a banner, this field
contains the value "1". Setting this
field is done when the user clicks on
the "Show the title, author and date on
page?" checkbox.
The JavaScript "document.write" method is used when using the PageBody to write out HTML content in a QuickPlace page. This field can be printed onto the screen via a document.write(PageBody) method called in a QuickPlace document. The following is an example of using this technique. In a Placebot, write the contents of the document into the PageBody field. If the PlaceBot has not run, or not run correctly, the PageBody field will be empty. If the document is displayed in a form where the PageBody JavaScript variable is not declared, an error will be reported. To avoid an error through an undefined variable, use the "typeof" operator. This test assigns a message string to the sPageBodyMessage variable and prints that instead of the PageBody. To customize this message, the text in quotes on the PageBodyMessage line is changed. Then the following is included in the HTML document:
<script language=JavaScript>
if ( typeof( PageBody ) == "undefined" ) {
var sPageBodyMessage = `Run the Mapperizer PlaceBot
to see a site map here...`;
document.write( sPageBodyMessage )
} else{
document.write( PageBody )
}
</script>
Page Object in HTML: some of the most commonly referenced JavaScript variables in Pages are set forth in Table 11.
TABLE 11
COMMONLY USED JAVASCRIPT VARIABLES IN PAGES
Field Name Data Type, Description
h_Name String, readable name of the Page
PageBody String, content of the page.
h_SystemName String, the internal name of a page. For
example, `h_Welcome`
h_Originator String, full Notes format name of the
document creator For example: `CN=Anna
Rath/OU=Millennia/OU=QP/O=Server`;
h_IsPublished String, number representing "1" for
published or "0" for not published.
h_LastTimePutAway String, representing the date and time
the Page was last saved `09/03/2000
07:54:08 PM`
Form String, Domino Form name used to create
the Page. Most documents in a
QuickPlace are created with the
`h_PageUI` Form. The value that
differentiates fields is the h_Type
field.
HTTP_COOKIE String, all cookies available to that
Page.
HTTP_HOST String, name of the server. For example
`millennia.com`
HTTP_REFERER Page used to send the user to this page.
HTTP_USER_AGENT String, browser used to access the
current Page. For example: `Mozilla/4.0
(compatible; MSIE 5.0; Windows NT;
DigExt) `
REMOTE_USER String, full name of the person reading
the Page, for example: `CN=Doug
Mudge/OU=Millennia/OU=QP/O=Server`;
Server_Name String, the server name, for example:
`dwyss.lotus.com`
h_DocSize Integer, size of the page, for example:
4705
h_ModifiedDate String, date and time the page was last
saved, for example: `09/03/2000 07:54:05
PM`;
Using Notes name format in pages can be done with the following JavaScript Function:
function fnGetSimpleName(sTxt) {
iTxtStart = sTxt.indexOf(`=`) ;
iTxtStart++;
iTxtEnd = sTxt.indexOf(`/`) ;
if(iTxtEnd == -1) iTxtEnd = sTxt.length;
sTxt = sTxt.substr(iTxtStart,iTxtEnd - iTxtStart) ;
return sTxt;
} ;
return fnGetSimpleName (`CN=Doug Mudge/OU= Millennia/OU=
QP/O=Server`)
This JavaScript will return the string "Doug Mudge" PlaceBot Object A PlaceBot object 184 is a Java or LotusScript Domino Agent, used to create or manipulate QuickPlace objects automatically. Domino Equivalent: Domino Agent. For Java and LotusScript programmers, the PlaceBot is the main way of implementing sophisticated functionality to a QuickPlace. Within the bounds of an HTML document, industry standard authoring tools such as HTML are used. To make links between Objects and manipulate QuickPlace Objects, PlaceBots are used. Theme Object A theme object 186 is a group of files which defines the look and feel of a QuickPlace. The Domino equivalent is a group of data notes. Themes are a mechanism for determining the layout and appearance of a QuickPlace. They also help introduce functionality, and although not their primary function, some content. There are two types of themes 186 in QuickPlace. User defined or custom themes" and default Themes. Subroom Theme Object The subroom theme object 188 is a subset of themes 186 in a QuickPlace. The Domino equivalent is a data note. By default, subrooms 194 inherit the theme 186 being used by the (main) room 174. Only when the theme being used in the subroom 194 has been modified, does it act independently of the room 174. Member Object A member object 190 is a data note listing a user in the Contacts1.nsf. The Domino equivalent is a note in contacts1.nsf. Members 190 are records specifying user-access to a room 174. A member note contains information about a team member of a QuickPlace. In addition to this data, the member must be listed in the access control list (ACL) of main.nsf and in a group in names.nsf to pass authentication. Table 12 sets forth the fields 180 used to define members 190.
TABLE 12
FIELDS USED TO DEFINE MEMBERS
Field Name Description
h_Password This member's password. Encrypted with
@Password
h_FirstName This member's first name
h_LastName This member's last name
h_PhoneNumber This member's phone number
h_EmailAddress This member's email address
Table 13 sets forth the fields 180 used to define Groups.
TABLE 13
FIELDS USED TO DEFINE GROUPS
Field Name Description
h_Members The list of members who belong to this
group, listed in full heirachical
format.
Subroom ember Object A subroom member object 192 is a subset of entries in the main room 174 of a QuickPlace. The Domino equivalent is a Data note in contactsl.nsf. Subroom member 192 has a similar structure to a room member 174, but specifies user-access to the SubRoom. These SubRoom members 192 are a subset of the (main) room 174 members list. This means that to grant access to new users, they must first be added as readers (or greater) in the main room 174. SubRoom Object A subroom object 194 is a container within a QuickPlace with separate security to main Room. The Domino equivalent is an NSF Database. Subrooms 194 are similar in structure to Rooms and are used to create discreet meeting places for subset of the Members in a Place. The subroom object in PlaceBots: To locate a room, look in the main QuickPlace Server directory, then look into the Place Object (a directory bearing the name of the QuickPlace). The Subroom will be named "PageLibrary" followed by a 16 digit hexadecimal time stamp number , such as "0123456789ABCDEF" then the ".nsf" suffix. By way of example, the following script looks for a Subroom to the Millennia place: Set dirPlace=New NotesDbDirectory(g_sServerName) Set ndbPlace=dirPlace.GetFirstDatabase(DATABASE) sNdbPlaceFilepath=ndbPlace.FilePath If Instr(1, Lcase(sNdbPlaceFilepath), .vertline.QuickPlace.backslash.millennia.backslash.pagelibraryl.vertline.) Then The Instr method has been used to look for this database, down to the PageLibrary part of the string, because it is difficult to know what the 16 digit number will be. Page Object in HTML: To create URLs to reference Subrooms, the URL is built in the Main Room using either the "h_Area" view or the "h_TOC" view to create the path. This View contains the "h_LocDbName" field as the first sorted column. Resources Object A resources object(not shown) is database of shared resources, having as its Domino equivalent NSF Database. It serves as a centralized container for resources required in all QuickPlaces on a server. Images, layout files and fonts are stored in this database. For example resources such as the button that appears beside the simple search image "Go.gif" is stored in this database. The easiest way to find items in this database is by scrolling through the h_SystemNameView. A dummy form may be used to view such elements. Common QuickPlace Object Fields In Tables 14 through 18, fields and JavaScript variables in the h_PageUI form are set forth. These include general fields which can be customized for each layout, fields to define publishing status, fields for defining locations, fields for defining security, fields for defining workflow status, fields for defining calendars, respectively. System objects have special meaning depending on the type of object. The following tables describe fields in various QuickPlace Object types.
TABLE 15
FIELDS USED TO DEFINE PUBLISHING
Field Name Description
h_IsPublished 1 = This object is currently
published
h_IsHidden 1 = This object is not shown to the
user
h_SetReadScene The name ot the default scene
(subform) to use when viewing this
object
h_SetEditScene The name of the default scene
(subform) to use when editing this
object
h_PublishedVersionUNID If this object is being edited and
the current object is the draft
version, the UNID of the published
version of this object.
h_DraftVersionUNID If this object is being edited and
the current object is the published
version, the UNID of the draft
version of this object.
h_LastTimePutAway The last time that this object was
changed: Published or Saved under
construction.
Customizing the Object Model While much of a QuickPlace can be customized via a browser, there are some parts of QuickPlace which can only be customized using a Notes Client and or the Domino Designer. Changes that can be made via a browser, using Web authoring tools such as an HTML editor relate more to the user interface. For example, editing a skin can be done using an HTML editor. Changes made to QuickPlace Objects are done through the Notes client and in Domino Designer. For example, inspecting and customizing the images appearing in default QuickPlace pages must be done via the Notes Client. In order to implement PlaceBots (Bots) in a QuickPlace it is cumbersome to test the Bots only in QuickPlace, especially when uploading the PlaceBots each time over the Internet. The Notes Client and Domino Designer may be used as a local test environment, thus allowing changes on the Bots, as well as providing an integrated development environment, with help files and debugging mechanisms. When finished creating and testing the Bot in the Designer, it may be uploaded to the QuickPlace and testing finished there. Using the Notes Client and the Domino Designer also allows creation of new objects in a QuickPlace. Taking this a step further, it is possible to redefine the object model, by adding features to a standard QuickPlace. Core Domino technology is a proven platform, providing many powerful tools for a project. For developers who are not familiar with Domino, they can use a wide range of development skills such as HTML, XML, DHTML, JavaScript, Image manipulation, Java and C++. Domino developers can also leverage Domino development skills, but either way it is possible to create robust web-based applications, without having to re-invent the wheel. QuickPlace Object Model and HTML: Building URLs Building URLs in a QuickPlace is an important issue, due to the fact that QuickPlace is a browser based application. Understanding QuickPlace URLs is also a good way of understanding the object hierarchy in QuickPlace. The relationship between URLs and the QuickPlace Object model flows in both directions. Understanding the structure of URLs helps understanding the QuickPlace Object model. Conversely, once the QuickPlace object model is understood, how to use URLs to manipulate a QuickPlace becomes apparent. URLs in QuickPlace use the same structure as in Domino. Domino URLs allow locating documents by using the key value of the first sorted column of a view, then generate a URL to link to a document using this key. Once the documents are located, they are not always opened in the browser. Sometimes they are read and their contents exposed and used by other objects. An example of locating a file without opening it is when a QuickPlace skin accesses a JavaScript LSS file. The user never sees the LSS page, but its contents are used by the visible page to render objects and perform functions. To locate a document in Domino, the initial part of the URL is pointed to the host server, then the database containing the required document. The next part of the URL must point to a view with the first column specified as being sorted. This first, sorted column becomes the key column. Then a URL is used to open the document, as in the following example: http://Host/Database/View/Key?DominoURLCommand Where: View: is the name of the view. To access a document regardless of the view, substitute a zero (0) for the view name and specify the document by its universal ID. Key: is the string, or key, that appears in the first sorted or categorized column of the view. If the key has spaces in it, substitute these for plus signs when creating a URL. This syntax is used to open, edit, or delete documents and to open attached files. Domino returns the first document in the view whose column key exactly matches the Key. There may be more than one matching document; Domino always returns the first match. The key must match completely for Domino to return the document. However, the match is not case-sensitive or accent-sensitive. DominoURLCommand: Is the instruction to Domino of what to do with the file when found. For example, ?OpenDocument, ?EditDocument and ?DeleteDocument. If this DominoURLCommand is omitted a default will be substituted. For example, in the previous URL if the OpenDocument argument is omitted in a URL command the document will still open because the command is automatically interpreted as OpenDocument. The structure of URLs in a QuickPlace is the same as in any Domino database. QuickPlace objects are quite often referred to via relative URLs. For example, to reference a page that has been created, the following syntax is used: ../../h_View/PageName?OpenDocument Where: "../.." section at the front of the URL creates a relative URL, is interpreted by the Domino server as referring to the parent objects of the current object (h_View and PageName). Examples: http://www.mercury.com/register.nsf/Registered+Users/ Jay+Street?OpenDocument http://www.mercury.com/register.nsf/0/466c5172561e1c5c8 52566c2005f6bbb?OpenDocument Many QuickPlace objects in QuickPlace have internal names beginning with "h_". This is refers to the internal name of QuickPlace which is "Haiku". To reference images, JavaScript library files or files other than pages, the following syntax can be used . . . ../../h_Index/Document+Name/$File/Imagename.gif? OpenElement Or . . . ../../h_Index/Document+Name/$File/ScriptLibName.js?Open Element Many objects in QuickPlace can be located via the h_Index View. It contains links to many of the published objects in a QuickPlace. When referencing a JavaScript file the ?OpenElement argument is used. This is to tell Domino that the file being accessed is not a page to open, which is the default action. Building URLs: Referencing Images The following section deals with the issue of using images in QuickPlace. Referring to FIG. 6, due to the fact that QuickPlace is a platform for creating Websites, images 242, 252 form a vital part of the QuickPlace object model. QuickPlace's structure provides many ways to include images in pages. For example when creating skin files 260, the images 242 are automatically uploaded into the QuickPlace 172 when the skin file 230 is uploaded. Described hereafter are techniques involved for fully automated importing procedures within QuickPlace. An example of an automated importing would be when creating and uploading a Microsoft Word file 250. When this is done the images are imported without any interventions. There are also instances where some developer intervention is required, such as when creating a Skin file 230, or writing an importable HTML file 254, or referencing files required to display the results of a PlaceBot and so on. Creating skin files are fully described hereafter in connection with themes. Three methods are used for importing images. These are: Method 1: Provide a URL to an image and let QuickPlace upload the image. This method is used when creating skins and imported HTML documents that do not use JavaScript to reference images. Method 2: Create a URL, have QuickPlace upload it, then reference it using HTML or JavaScript. This method is used when rendering image using JavaScript. Method 3: Manually upload images into a document and reference them via URLs from a separate document. This method is used if the image is very large and it desired to have the user's browsers be able to cache the image; or if the image is referenced within a JavaScript function (QuickPlace does not import images when they appear within JavaScripts); or the image is referenced within a PlaceBot which creates new pages. The solutions selected for a particular application may be a mixture of all three. For example: Referencing Images: Method 1. Create a Skin file or HTML imported page and let QuickPlace import it. This works in skins and imported HTML, and is the easiest way of importing images into Skins and HTML Pages. When a valid link to an image within an HTML page or a Skin is created, QuickPlace will upload it automatically when the Skin or HTML file is uploaded. For this to work, a valid URL must be created. This may be done as follows: In the skin file or importable HTML document, download all the images in a local directory. The simplest way to do this is to save them in the same folder as the skin or HTML page. For example, the URL for an HTML file may be: <img src="transparent.gif" width=5 height=1 alt=" " border="0"> Referencing Images: Method 2. Prompt QuickPlace to import the file into the current document, then reference the file using JavaScript. This method is the most efficient method to use when referencing an image via a JavaScript function (in a Skin for example) or when updating a document via a PlaceBot. To force QuickPlace to upload the image, a valid URL to the image at the top of the page must be created. By rendering it in a 1 pixel.times.1 pixel size, making it too small to see, the image is still uploaded, but the user will not notice the image. The images must also be named when they appear in their 1.times.1 pixel format. By using this name, the image is made available to JavaScripts below it on the page. This is done by adding the image to the source code near the top of the page. To force QuickPlace to upload the image, it is rendered in HTML format, then the uploaded image referenced in the JavaScript. Overview: PlaceBots In accordance with a preferred embodiment of the invention, PlaceBots are provided for sharing documents and holding discussions with team members, for adding program logic to a place itself to perform actions which can be triggered as the result of submitting a form or scheduled to run at a particular time. For example, every three hours a PlaceBot program may execute to browse customer complaints, parse for specific key words, and move documents to related specific folders. Or, a PlaceBot may be written to perform actions responsive to customer complaint. A PlaceBot is implemented by an agent. For example, a browser user creates a reviewer, sends the invitation, adds logic--using Java code. Then, the Java code is attached to a QuickPlace by dragging and dropping the code into a QP form. The QP server receives and compiles the,code into a notes agent. Thus, code is integrated into a QuickPlace using a browser. The QuickPlace server compiles and link edits the code so that every time a reviewer is created that code gets run. Overview: Imported HTML Forms In accordance with a further embodiment of the invention, a review form may be designed in HTML separate from QuickPlace. The resulting form is then dragged and dropped into QuickPlace, which creates a form for it. This is done by creating a field for each html tag. Thus, each HTML field is parsed to create a corresponding QuickPlace field. For HTML files, the HTML file is parsed, the linked images found, and the URLs processed. The original file, linked files, and the resulting HTML are then saved on the page with the HTML displayed in read mode, and the orginal file in edit mode. Overview: MicroSoft Office Based Forms In accordance with a further embodiment of the invention, an existing Excel spreadsheet or Word document in a power point presentation, for example, is used as a template, dragged and dropped by the browser user into a QuickPlace, which then creates from it a QuickPlace form. Thereafter, users can create new MicroSoft documents using the QuickPlace form. For Office documents, the MicroSoft office native mechanism is used to convert the page to HTML. The original file and the resulting HTML are then saved on the converted page, with the HTML displayed in read mode, and the original file in edit mode. Overview: Forms and Task Fields In accordance with a further embodiment of the invention, a web browser way of creating and designing forms is provided. A browser user may, using QuickPlace and interacting with the QuickPlace user interface, create a form as an object of the QuickPlace and select and create fields for that form. Overview: In Place Editing In accordance with a further embodiment of the invention, a browser user can create MicroSoft Office documents from within QuickPlace, such as a new Excel web sheet. QuickPlace will automatically launch Excel, and when Excel is closed, QuickPlace will bring in the Excel spread sheet. Using HTML Because the Page, ListFolder, and Slideshow layouts share so many common components, one HTML file that applies styles to these three layouts can be created. HTML for the Slideshow Folder is created, which contains the superset of components used in the three layouts. To control how the non-applicable components display for a layout--for example, the Jump component for the Page layout, and the AuthorAndModified and Revision components for the ListFolder--various results are achieved by setting the emptyFormat, prefixHTML, and postfixHTML parameters. For example, to have the empty components occupy the same vertical space as they do when in use, set the parameter as follows: emptyFormat=" " By placing each component in a separate table row, the component's row "collapse" when it is empty, so that it occupies no space. Given that the prefixHTML and postfixHTML parameters are not output when the component is empty, these parameters can be used to provide the following table structure: emptyFormat=" " prefixHTML="<tr><td>" postfixHTML="</td></tr>" Style Sheet Selectors in QuickPlace Referring to FIG. 7, a typical QuickPlace user interface 370 includes a sidebar (TOC) 372, page title 374, author and modified field 376, actions bar 378, logo 380, path 382, page content 400, and actions buttons, such as quick search 384, advanced search 386, whatsnew 388, chat 390, notify 392, print 394, tutorial 396 and help 398. Each of these is customized by using tags or selectors which deal with borders, background, text, and so forth, in accordance with a style sheet. A standard default stylesheet is always output with any theme, so that one need only to specify the selectors that are to be changed. Undefined properties will fall back to those defined in the default stylesheet. Tables 19 through 27 describe Style Sheet (CSS) Selectors.
TABLE 19
Tag Styles
CSS Selector Description and Notes
body, td Default text style. Note: specify both tags
to set the default text style.
a Anchor style. Note: see also several other
more specific anchor styles, below.
a:hover Default style of anchors when mouse is over
the anchor. Note: IE only.
form Default style of forms. Note: The
margin-bottom property is set to Opx by
default to remove unwanted whitespace from
the bottom of all forms.
(Note: Other tags, such as h1, h2, etc., can also be styled as needed.)
PlaceBots A PlaceBot is a Domino agent, written either in Java or LotusScript, that automates a task. Using a PlaceBot (or "Bot"), one can access, process, and manage the data in a QuickPlace. For example, one might use a PlaceBot to send E-mail to members of a QuickPlace that notifies them when a document of interest is edited. One can create a PlaceBot that runs when a form is submitted or on a scheduled basis. A PlaceBot may also be run manually. A PlaceBots is created using LotusScript or Java to manipulate the Domino back-end object classes. For complete documentation on the Domino Object Model and how to work with objects using LotusScript or Java, see the Lotus Domino R5 Programming Guide. It is possible to write, debug, and compile Java code for a PlaceBot in a Java development tool, such as Symantec Visual Cafe. One can then import the .java file, or compile and import a .class or .jar file. It is also possible to write Java or LotusScript code in any editor and import the resulting files into the QuickPlace. When Java PlaceBots are uploaded, they are automatically compiled, and a syntax check is done on them. Triggering PlaceBots QuickPlace has a page in the Customize area where settings to control how and when the PlaceBot runs are specified. These settings are similar to the Domino Agent settings, but not the same. There are two ways of triggering PlaceBots. Scheduled PlaceBots, triggered by a timer event or Form PlaceBots which are triggered by the creation of documents, based on the form type. Scheduled PlaceBots Scheduled PlaceBots are processed by the agent manager, and have the Access rights of the QuickPlace Manager. Form PlaceBots Form PlaceBots are triggered by the creation of a document based on any of the user forms in a QuickPlace. For example, if a new HTML form is created, one can specify that the Bot is to run on documents created with that form. If PlaceBots are triggered by document creation, they have the same access rights as the person who created the document. The Difference Between PlaceBots and Domino Agents PlaceBots are in effect, Domino agents. However, a PlaceBot is installed into a QuickPlace via the QuickPlace upload control. An agent is installed using the Domino Designer. Also, a PlaceBot can be created in any text editor, then uploaded. Another advantage of PlaceBots over Agents is that they can be stored as small LSS, Java JAR or Class files on a hard disk, and installed quickly on any QuickPlace, even without administrative access to the server. Manager access to the QuickPlace is all that is required. PlaceBot security When PlaceBots are run on a scheduled basis, they inherit the access control of the server. When PlaceBots are run manually, they have the access rights of the person triggering them. In other words, one must have Manager access to create, edit, copy, delete, or run PlaceBots manually. Write a PlaceBot In the following example of how to write PlaceBots, a dummy QuickPlace is created using the Domino Designer, as follows: 1. Create a QuickPlace. 2. Create documents, folders, links, and so on that the Bot will be referencing. 3. Close down the QuickPlace server. 4. Create a copy of the NSF file(s) that were created by QuickPlace. In most cases this will be the "main.nsf". 5. Open the NSF file in Domino Designer and start writing a Domino Agent. 6. Test the PlaceBot in the NSF. 7. Export the Agent and save java agents as a .Java, .JAR, .Class or .ZIP file. If writing a LotusScript file save it in .LSS format. To export a Java file, press the Export button in the Designers pane. To export a LotusScript file, right click on the designers pane and select Export. 8. Make sure the QuickPlace server is started and return to the original QuickPlace. 9. Go into Customize->PlaceBots then create and test your PlaceBot. 10. For small changes it is easier to open the LSS file in a text editor, then copy the changes back into the original LotusScript Agent. For the more complex changes go back into the Domino Designer. Java PlaceBots Java PlaceBots accept file types .JAVA .CLASS and .JAR. It is possible to also upload multiple files. PlaceBots can be writen in a text editor, using QuickPlace as the test environment. It is possible also to use third party Java development tools, such as Visual Age for Java. LotusScript PlaceBots Creating PlaceBots using LotusScript is essentially the same as writing an agent for a Domino application. There are two alternatives for writing LotusScript (LSS) PlaceBots. It is possible to write LSS Bots in a text editor and test the Bots in the QuickPlace. This section uses some examples of LotusScript that show the process of creating a PlaceBot and exposes the object model. An exemplary PlaceBot has the following list of functional features: Graphical display of folder/page relationships Alphabetical list of pages Theme like customizing of the map page Easily modify the folder and page images Full control over fonts, sizes, colors and so on Ability to wrap the document in any HTML required Selective page mapping--Pages and Links but not Room links Map document could be switched off if decided by the Manager Map document could appear wherever the Manager decided The map document would be updated whenever a new Page document was added. PlaceBot Description Referring to FIG. 9 in connection with Tables 28-46, an exemplary method for creating a PlaceBot will be described. In step 402, variables relating to the session, the database and its major structures such as view and key documents are declared. PlaceBot starts off by Dimming (declaring) the variables related to the session, the database and its major structures such as Views and key documents. The Dims are typically divided into two groups; dims for Notes related objects, then the writing Dims, which are used in content creation, mostly via strings. In step 404, documents related variables are set, for example using a skin for the site map page. This step, code for which is set forth in Table 28, sets the document related variables. These Sets are related to finding documents, working from the Database, down to the individual SiteMap document. If the SiteMap page is not found in the QuickPlace then the Bot quits. This is to allow a bit of flexibility in the order in which the Bot is installed. Errors are not generated done out of order, delete the site map page or name the site map page wrongly. This approach also allows use of a skin for the Site Map page. The skin file is the SiteMap.htm. This HTML wraps the map, can be modified, place by place, without having to change the Bot. In its current form, the SiteMap Bot and Page separate LotusScript and HTML scripting making the overall programming of the Bot simpler.
TABLE 28
SET DOCUMENT RELATED VARIABLES CODE
sMapDocName = "SiteMap"
Set ndb = ses.CurrentDatabase
Set viewCurrent = ndb.getView( "h_Index" )
Set docReport = viewCurrent.GetDocumentByKey(
sMapDocName )
If docReport Is Nothing Then
Call logAgent.LogAction("Mapperizer: Document" &
sMapDocName & "not found" )
Exit Sub
End If
In step 406, the table of contents (TOC) is found and set as a special view.
TABLE 29
SET TOC AS SPECIAL VIEW
Set viewTOC = ndb.getView("h_Toc")
In step 408, URLs referencing current QP documents and attached images are created. The looping functions of Table 35 gets each element in the viewTOC then performs a number of calculations on that TOC element. Some TOC elements may be views, in which case that "sub view" is stored in the variable named viewcurrent. To start creating the URL strings for each entry, the following dims and sets are made. The sDbPath now is a string formatted for use within a URL, in other words its backslashes are replaced by forward slashes. Ascii character 47 is a forward slash, and character 92 is a backslash.
TABLE 30
CREATE URLS/ATTACHED IMAGES
Dim sFSlash As String
Dim sBSlash As String
Dim sDbLabel As String
Dim iSlashPos As Integer
sDbPath = ndb.FilePath & "/"
sFSlash$ = Chr(47)
sBSlash$ = Chr(92)
iSlashPos = Instr(1, sDbPath$, sBSlash$)
While iSlashPos <> 0
Mid$ (sDbPath$, iSlashPos, 1) = sFSlash$
iSlashPos = Instr(1, sDbPath$, sBSlash$)
Wend
To introduce images onto the current page, a URL is created that references the current QuickPlace document, then the images that are attached to it. These images are automatically uploaded when the SiteMap.htm file is uploaded. The URL uses a lookup in the h_Index in the current QuickPlace, and references the name of this page, set in the variable in sMapDocName. The h_Index is a view that allows one to look up all documents in the QuickPlace using their ID. For example, to get an image: <img src="http://quickP.com/quickplace/MyPlace/Main.nsf/PageMap/$FILE/Page. gif?OpenElement"> To simplify this, the same path structure is kept but made relative: <img src="../../PageMap/$FILE/Page.gif?OpenElement"> In the script of Table 31, the name of the PageMap document is replaced by a variable. This is to make it easier to change the name of the file. The names of the GIF images names are hard coded. If the developer wants to modify the SiteMap look, it is easier to just create a new image and save it with the same name.
TABLE 31
TAG MAP HTML
`writing sets
sFolderImg = .vertline.<img src=../../h_index/.vertline. & sMapDocName &
.vertline./$FILE/Folder.gif?OpenELement
border=0
width=20 height=13>.vertline.
sPageImg = .vertline.<img src=../../h_index/.vertline. & sMapDocName &
.vertline./$FILE/Page.gif?OpenELement
border=0
width=13 height=13>.vertline.
sPageSubImg = .vertline.<img src=../../h_index/.vertline. & sMapDocName
&
.vertline./$FILE/PageSub.gif?OpenELement
border=0
width=29 height=13>.vertline.
sIndentImg = .vertline.<img src=../../h_index/.vertline. & sMapDocName &
.vertline./$FILE/Indent.gif?OpenELement
border=0
width=13 height=13>.vertline.
sHeadingStyleTag = "<span class=h-mapHeading-text>"
sStyleTag = "<span class=h-map-text>"
sFolderStyleTag = "<span class=h-mapFolder-text>"
sDetailStyleTag = "<span class=h-mapDetail-text>"
sEndStyleTag = "</span>"
sIndentConcat = ""
The next few lines set up some more HTML. The first of which is a header line. The HTML <HEAD> tag is written over when a skin is created, and so the sHTMLHead variable's contents are not used unless writing to the disk as an HTML File. This is included for debugging purposes only. In step 410, map HTML is entered and tagged. Referring to Table 32, the sHTML01 tag is added to the document before the map HTML. This is not at the start of the entire document, but at the start of the Map. To put code into the true start of an HTML document in a QuickPlace, manipulate the Notes objects directly, using the Domino Designer. To insert JavaScript or Style tags in a site map document, put them in the sHTML01 string variable. The sHTML02 tag is added at the end of the map HTML. This HTML is not at the absolute end of the HTML stream for the page, it appears at the end of the map section. Pipe characters are used to define strings because they allows one to put in un-escaped quote characters, but more importantly the strings appear as they are typed, making it easier to debug.
TABLE 32
TAG START OF MAP
sHTMLHead = .vertline.<html><head><link rel=stylesheet
type="text/css"
href="Mapperizer.css"></head>.vertline. `only for debug
sHTML01 = .vertline.<!-- start -->.vertline. `put JavaScripts here or
the
imported document
sHTML02 = .vertline.<!-- end -->.vertline. `this will be
concantenated at the
end
In step 412, a loop through the TOC is executed, and visible text created. In Table 33, start looping through the Table of contents. The view "h_Toc" is very important to this Bot, as it is the main guide to locating relevant folders and documents. It is also possible to use the h_Index to find all documents, and look at their properties. To get all documents, the h_Index is a good view to use. If a document cannot be found in the TOC view, the Bot exits as errors will occur if the loop continues.
TABLE 33
START LOOP THROUGH TOC
sMainText = sHTML01
Set docInTOC = viewTOC.GetFirstDocument
If docInTOC Is Nothing Then `make sure the TOC is found
Call logAgent.LogAction("Mapperizer: TOC Not Found" )
Exit Sub
End If
Referring to Table 34, visible text is now beginning to be created, first the title of the page, including the Place name. The StyleTag is a CSS span instruction to help with formatting.
TABLE 34
STYLETAG
sMainText = sMainText & sHeadingStyleTag &
"All Documents in the"
sMainText = sMainText & ndb.Title & "QuickPlace" &
sEndStyleTag
Referring to Table 35, a few of the database statistics are added to the main text string.
TABLE 35
DATABASE STATISTICS
sMainText = sMainText & "<br>" & sDetailStyleTag & "Current
Database Size:"
& Cstr(ndb.Size/1024) & "k"
sMainText = sMainText & sDetailStyleTag & "Created:" &
Cstr (ndb.Created)
sMainText = sMainText & "Last Modified:" & Cstr(
ndb.LastModified ) &
sEndStyleTag & "<br>"
Referring to Table 36, start cycling through the documents in the TOC. The TOC contains a list of links that refer to items the users of the QuickPlace have chosen to display there. For example in a QuickPlace there may be a Welcome document, a Discussion view, a link, a slides show and some other QuickPlace tools such as Customize. Each of these elements is represented in the TOC by a data note. The only thing that the objects here have in common is that they have the field h_IsInTOC containing a value of "1" (text), and that it is properly published (is not in draft mode and does not contain any $Conflict fields or documents that are in draft mode). Published items in QuickPlace are distinguished by the h_Type field. If this field contains a "0" it is a document, "1" is a view and so on. In the section below value of "0" is found in this field and the item dealt with as a document.
TABLE 36
TOC PROCESSING
While Not ( docInTOC Is Nothing )
If docInTOC.h_Type(0) = "0" Then `it is a doc
Set docTemp = docInTOC
Referring to Table 37, now that a document is found, the code can start building the text string for that elements listing. It would be a little strange if the site map page was visible in the map, so it is skipped in the looping process. The sMapDocName variable has the document's name assigned to it.
TABLE 37
ASSIGN DOCUMENT NAME
If docTemp.h_Name(0) <> sMapDocName Then
In step 414, URL strings are built for linked documents. Referring to Table 38, another type of document that is handled a little differently is the Link type document. QuickPlace knows a document is a Link if the field h_URLPointer is not empty. So if the h_URLPointer field has content, the URL string is built using the content of that field.
TABLE 38
BUILD URL FROM LINK TYPE DOCUMENT
If docTemp.h_URLpointer(0) <> "" Then `it is a link
sMainText = sMainText & "<br>" & "<a href=" &
docTemp.h_URLpointer(0) & ">"
Referring to Table 39, otherwise build the URL using the main view of any Main.nsf database, the h_Index view. The H_Index view is the most important view for creating unique resource locators (URLs). The following line uses the Universal Identifier of the page being referenced. This value can be found in the first, visible, sorted column in the h_Index view. Here the script continues building the text string for that element's listing.
TABLE 39
BUILD URL FROM MAIN VIEW
Else
sMainText = sMainText & "<br>" & "<a href=../../h_Index/" &
Cstr(docTemp.UniversalID)
& "?OpenDocument>"
End If
sMainText = sMainText & sPageImg & sStyleTag &
docTemp.h_Name(0) & sEndStyleTag
sMainText = sMainText & sDetailStyleTag
sMainText = sMainText & "(Last Changed:" &
Cstr(docTemp.LastModified)
sMainText = sMainText & "Size:"
If docTemp.Size < 1024 Then
sMainText = sMainText & "0"
End If
sMainText = sMainText & Cstr( docTemp.Size/1024 ) & "k"
sMainText = sMainText & ")" & sEndStyleTag & "</a>"
nLinkCount = nLinkCount + 1
`end standard formatting
End If
In step 416, database elements are linked. Referring to Table 40, the next Elseif operator executes if a view is found, here represented as a list of "notes". Each of these Notes creates a link to a database element; in this case a view. QuickPlace's definition of a View Note is that the h_Type field is 1. Finding the internal name of the view being referred to is done by finding the value of the h_SystemName field, and storing it in the sSysName variable. The sSysName now contains the internal name of the view. This variable helps to find the current folder or view.
TABLE 40
LINK TO VIEW
Elseif docInTOC.h_Type(0) = "1" Then `it is a folder/view
sSysName = docInTOC.h_SystemName(0) `get the internal name
of the view `if it is a link to a QuickPlace tool page
In step 418, response folders are mapped. Referring to Table 41, it is now known that a folder of a type to map has been found. The iNested variable is set to 1 if it is a response folder and some form of indentation is suitable.
TABLE 41
INDENT RESPONSE FOLDER
Else
iNested = 0
If docInTOC.h_FolderStyle(0) = "5" Then `it is a response
folder
iNested = 1
End If
Referring to Table 42, the view name is now put into the viewCurrent variable. The URL to the view used here is not the database/view, but rather database/h_Index/viewDesignNoteID. This is another example of how the QuickPlace Object Model works with_Design Notes. Referencing the design note will redirect correctly to the view. This section of the script does exactly that, and writes some more text to the sMainText variable, which will later be printed out as the map page content.
TABLE 42
REDIRECT TO VIEW UPON REFERENCE TO DESIGN NOTE
Set viewCurrent = ndb.getView( sSysName )
sMainText = sMainText & "<br><a href=../../h_Index/" &
Cstr(docInTOC.UniversalID)
& "?OpenDocument>"
sMainText = sMainText & Chr(13) & Chr(9) & sFolderImg
sMainText = sMainText & sFolderStyleTag & docInTOC.h_Name(0)
& sEndStyleTag & "</a>"
In step 420, all documents in the view are gathered. Referring to Table 43, inasmuch as the folder has been found, and written to the sMainText variable, it is now time to get all the documents in the view. To do this the docTemp variable is used to gather all documents in the view. The code in this section is similar to that for finding documents in the top level of the TOC. However, they have several subtle differences. The main one that the user sees is that they are indented to one extent or another. Normal documents are indented one space (13 pixels), but pages in response folders that are responses are indented a further 13 pixels.
TABLE 43
GATHER ALL DOCUMENTS IN VIEW
Set docTemp = viewCurrent.GetFirstDocument
While Not (docTemp Is Nothing)
If docTemp.h_Name(0) <> sMapDocName Then
sMainText = sMainText & "<br>"
If docTemp.IsResponse And iNested Then
iIndentDistance = 13
sIndentConcat = "<img src=blank.gif width=" &
Cstr(iIndentDistance)
& "height=1 border=0>"
sPrevSetParentUnid = sThisSetParentUnid
Else
iIndentDistance = 0
sIndentConcat = ""
End If
sMainText = sMainText & sIndentConcat
Referring to Table 44, link documents are be indented further because they are contained within folders, not appearing in the TOC at the top level.
TABLE 44
LINK DOCUMENTS INDENTATION
If docTemp.h_URLpointer(0) <> "" Then `it is a link
sMainText = sMainText & "<a href=" & docTemp.h_URLpointer(0)
& ">"
Else
sMainText = sMainText & "<a href=../../h_Index/" &
Cstr(docTemp.UniversalID)
& "?OpenDocument>"
End If
sMainText = sMainText & sPageSubImg & sStyleTag &
docTemp.h_Name(0) & sEndStyleTag
sMainText = sMainText & sDetailStyleTag
sMainText = sMainText & "(Last Changed:" &
Cstr(docTemp.LastModified)
sMainText = sMainText & "Size:"
If docTemp.Size < 1024 Then
sMainText = sMainText & "0"
End If
sMainText = sMainText & Cstr( docTemp.Size/1024 ) & "k"
sMainText = sMainText & ")" & sEndStyleTag & "</a>"
Update the counter for displaying in the log.
nLinkCount = nLinkCount + 1
Start the loop again.
End If
Set docTemp = viewCurrent.GetNextDocument( docTemp )
Wend
End If
In step 422, valid links are displayed for HTML accumulated for the page. Referring to Table 45, with respect to the other document types, even though is not relevant in this situation, it provides an easy way to implement mapping of room links. It would be possible to extend on this and go into the database for the room referenced here, and show all documents in that room. However, that would breach security principals, to allow users to see all room links. If a user did not have access to a room, the link would prompt a user name and password box to appear, and they would be stopped. Users would be informed that a room existed, but they were not able to enter. According to the QuickPlace model, only valid links are displayed. Also, another line is writen to the log, and the text finished for the page.
TABLE 45
MAP ROOM LINKS
Else `it must be some other sort of link, such as a room
(h_Type = "3")
End If
Set docInTOC = viewTOC.GetNextDocument( docInTOC )
Wend
Call logAgent.LogAction("Agent Mapped" & Cstr( nLinkCount )
& "documents" )
sMainText = sMainText & "<br>" & sHTML02 & "<br>"
Referring to Table 46, this is the final step; output of the accumulated HTML for the page. This code was developed in debug mode (iDebug=1)and the file written to an HTML file on the server. In a real environment, as these functions are disallowed in PlaceBots, security was reduced to allow this to work by setting the default access to Manager.
TABLE 46
OUTPUT ACCUMULATED HTML
If iDebug Then
`debug version writes to a file
fileNum% = Freefile()
Open "D:.backslash.trash.backslash.trash.htm" For Output As fileNum%
Print #fileNum%, sHTMLHead ; sMainText
Close fileNum%
Else
`release version writes to a QuickPlace Main.nsf db
docReport.PageBody = sMainText
Call docReport.Save( True, True )
End If
Then finish off with the exit and error handing methods.
Exit Sub
lblLogError:
Call logAgent.Logerror(Err, Error$)
Resume Next
End Sub
Overview of the SiteMap.htm Page In this example, the SiteMap.htm page must be manually imported into the QuickPlace and is the target document for the PlaceBot. In other words, the Mapperizer PlaceBot goes looking for this file and refreshes it. It has two parts. The wrapping for the actual map is what is contained in the HTML file. In the middle of the page is an instruction to render the map, then at the end is some more HTML to finish off the page. The SiteMap PlaceBot and HTML file allow skin like customization. In other words its appearance can be dramatically altered to suit the Place. This is done by altering the HTML in the SiteMap.htm file, editing the images Folder.gif, Page.gif, PageSub.gif and Indent.gif which are referenced in the SiteMap.htm file. To rename the SiteMap page a variable in the Mapperizer PlaceBot sMapDocName is edited. When creating a new site map page, that is renamed with exactly the same name. SiteMap HTML Page Description The SiteMap HTML page is imported into QuickPlace and named SiteMap. It is basically a wrapper for rendering the images on screen and presenting a single JavaScript document.write command. Everything else is either cosmetic presentation or error checking. Referring to Table 47, the essential lines in this page render the four images on the screen, forcing QuickPlace to upload them:
TABLE 47
FORCE UPLOAD
<img src="Folder.gif">
<img src="Page.gif">
<img src="PageSub.gif">
<img src="Indent.gif">
Referring to Table 48, the JavaScript command to print the text created by the Mapperizer PlaceBot onto the screen.
TABLE 48
PRINT TO SCREEN
<script language=JavaScript>document.write( PageBody
)</script>
Referring to Table 49, to make the map more presentable, the images are rendered on the screen in a table. Using a table allows creation of a little vertical space, and also alignomg the images to the right. This is done to make the pixel images a little less obvious to the reader. Due to the fact that the table is only one pixel high, it can be filled with a color to create a really pretty line.
TABLE 49
RENDER IMAGES ON SCREEN IN TABLE
<table width=100% border=0 width=10 cellpadding=0
cellspacing=0>
<tr>
<td height=1 align=right><img src="Folder.gif" width="1"
height="1"><img
src="Page.gif" width="1" height="1"><img src="PageSub.gif"
width="1" height="1"><img
src="Indent.gif" width="1" height="1"></td>
</tr>
</table>
Referring to Table 50, next comes the section which draws the body of the document onto the page. The first JavaScript Line here makes sure that the PageBody variable has been declared. Content in the PageBody field of a Quickplace document is automatically placed into the PageBody JavaScript variable. If the "typeof" test in the following text determines that the bot has not run, a message is printed onto the screen giving information on how to get started. This is especially important because it helps avoid a JavaScript error through an undefined variable. The variable PageBodyMessage is the text to change to change the message displayed on screen.
TABLE 50
DRAW DOCUMENT BODY
<script language=JavaScript>
if ( typeof( PageBody ) == "undefined" ) {
var PageBodyMessage = `Run the Mapperizer PlaceBot to see a
site map .`;
document.write( PageBodyMessage )
} else{
document.write( PageBody )
}
</script>
Referring to Table 51, the Log should now show the following text . . .
TABLE 51
LOG TEXT
Started running agent `Mapperizer` on 09/05/2000 09:31:31 PM
09/05/2000 09:31:31 PM: Mapperizer: IBM Redbook Example
09/05/2000 09:31:31 PM: Mapperizer: Run agent: Mapperizer
09/05/2000 09:31:32 PM: Agent Mapped 18 documents
Ran LotusScript code
Done running agent `Mapperizer` on 09/05/2000 09:31:32 PM
Desktop Inegration Although Lotus QuickPlace is a web application that is displayed in a browser, much of the value that QuickPlace offers the user is its ability to easily allow content creation and content editing using tools and applications already familiar to the user. For example, in QuickPlace Release 1, users could write documents using Microsoft Word, the most popular and widely used word processor for the Windows platform, and then import these documents into QuickPlace. Therefore, Microsoft Word became a content-creation tool for QuickPlace. In-Place Editing Referring to FIG. 13, in accordance with a further embodiment of the invention, a browser user can create MicroSoft Office documents from within QuickPlace 352, such as a new Excel web sheet 354. As is represented by open line 357, QuickPlace will automatically launch Excel 358, and when Excel 358 is closed, as is represented close line 359, QuickPlace 352 will bring in the Excel spread sheet 356. Referring to FIG. 6, in general, standard web files 242, 244, 248, 252, 254 and 250 are brought into the browser as files 230, 234 and 238 such as via upload control 240, sent to the web server 258, Domino server 104 and QuickPlace extensions 108 and converted into application enabled objects 260, 262, 264 in QuickPlace 172. In accordance with a preferred embodiment of | ||||||
