Home

Portal Manager API Programmer`s Manual

image

Contents

1. m The special attribute generate static of the XML object does not have a numeric value No form template is assigned to the XML object At least one of the templates assigned to the XML object is a JSP template In this case the template directly assigned to the XML object should be an XSLT template Statification is performed in the same way as for JSP objects see section Statification of JSP objects on page 41 For each XML object the following files are generated a the statified page m if required the surrogate page with a link to the XML document Staging All objects of the WCM managed website pass through the following stages editing quality assurance and publication for productive opera tion Editing and quality assurance of the objects is carried out in the Content client After publication the objects can be accessed via a browser Passing through these stages is called staging Objects of a WCM managed website are edited using methods of the Portal Manager API especially the methods of the VipObjectHandlerBean Some of these methods change the content or the metadata of an object others cause a change in object status This represents the multi stage staging of Livelink WCM Server This staging 44 Livelink WCM Server Concepts corresponds to the life cycle of a WCM object which is shown in the following diagram Production view delete Kozysep Fig 5 The life cycle state of a
2. e key interface uses see ee M RE A Value use dass i a masse class 9 br P interface i Value Fig 28 Structural relations of complex data types The Repository Entry class Full name de gauss vip RepositoryEntry The objects of the RepositoryEntry class are the values that are stored in a RepositoryMap In principle a RepositoryEntry is also a map since the class is derived from the TupelMap class Storing an object of this class in a RepositoryMap results in a two level data structure Portal Manager API Programmer s Manual 103 Chapter 4 An important function of the class RepositoryEntry compared with the class TupelMap is to supply an interface to a directory service via JNDI A RepositoryEntry can be initialized with JNDI data and can also present itself as JNDI data The applicable interface is the JNDI attributes interface The RepositoryEntryIterator interface Full name de gauss vip repository RepositoryEntryIterator A RepositoryEntryIterator is a listing of the key value pairs in a RepositoryEntry By definition a new iterator is positioned before the first pair In order to access the pairs the iterator must be incre mented with one of the next methods for the first pair and the following pairs The RepositoryMap class Full name de gauss vip repository RepositoryMap The class RepositoryMap extends the class TupelMap especially by the possibility of filtering sorting
3. Metadata scheme in version 5e Metadata scheme in version 8 Attribute Value Attribute Value edit url StringValue url StringValue Note in repositories of type EDIT elements RepositoryMap all children ListValue email edit StringValue email edit SetValue email ga StringValue email ga SetValue email release StringValue email release SetValue filename StringValue filename StringValue Note Portal Manager APl specific genericl StringValue keywords SetValue generic2 StringValue description StringValue generic3 StringValue target group StringValue language StringValue language LocaleValue level IntegerValue level IntegerValue Note Portal Manager API specific linked from RepositoryMap linked from SetValue links to RepositoryMap links to SetValue name StringValue title StringValue object icon StringValue oid StringValue oid ObjectId 168 Livelink WCM Server Metadata Schemes Metadata scheme in version 5e Metadata scheme in version 8 Attribute Value Attribute Value pathname StringValue pathname StringValue prod url StringValue url StringValue Note in repositories of type PROD qs url StringValue url StringValue Note in repositories of type QA status StringValue state ObjectState status icon StringValue Remark accessible via ObjectState subtitle StringValue subtitle StringValue suffix StringValue suffix StringValue Note Portal Manager API specific template StringValu
4. When you have finished creating the layout proceed as follows 1 Create a JSP object 2 Execute your layout with HTML elements and then check the result in the browser Make any changes needed until the result is in line with your ideas You may have to check the page out and in again several times 3 Insert the JSP code in the page Make sure to separate the JSP elements from the HTML code as far as possible This makes the structure of the JSP page considerably clearer and makes it easier for you to implement changes necessary at a later stage The following sample code contains a JSP code for a multi content page in which different possibilities for loading the content are listed lt html gt lt head gt lt TITLE gt multiContent lt TITLE gt lt body gt lt This should be part of the Template Begin gt lt page import de gauss vip repository RepositoryEntry de gauss vip portalmanager converter HTMLContentConverter de gauss vip portalmanager ContentHandler Portal Manager API Programmer s Manual 147 Chapter 5 gt lt jsp useBean id sessionBean cla sco ss de gauss vip portalmanager SessionBean pe session gt lt jsp useBean id objBean cla sco lt ss de gauss vip portalmanager VipObjectBean pe session gt objBean setRepositoryName VIPDEPLOYMENT_NAME A user has to be logged in otherwise the operations are executed in the conten
5. key data The parameter key of these methods must be a Stringora StringValue The value of the parameter must be the fully qualified distinguished name DN the name of a user group or role If no DN has been specified as parameter key the DirectoryRepository searches for a principal in the following order 1 for a user whose DN contains the value of the parameter dn pattern ofthe repository 2 for a group with the retrieved DN cn key group base 3 fora role with the retrieved DN cn key role base The parameter data of the methods and the return values of the most methods are RepositoryEntry objects These RepositoryEntry objects contain the attributes of the LDAP entry referenced by key According to the mapping specified in the configuration of the repository these attributes are converted when they are written in the LDAP directory service or read from there The methods containsKey createEntry and loadEntry are executed in the context of the repository binding profile which is specified by the parameters principal and credential Thus these method can be executed independently of the currently logged in user As a precondition the binding profile user must have sufficient rights in the LDAP directory service The methods removeEntry and storeEntry are executed in the context of the currently logged in user provided that the parameters principal changes and credential changes have been configured for the
6. Livelink WCM Server Portal Manager API Programmer s Manual This manual describes how to develop dynamic and personalized websites on the basis of the Portal Manager API Highlighted topics include basic concepts of the Portal Manager API configuring the Portal Manager API in the Admin client e overview of the classes and interfaces of the Portal Manager API e application examples of programming with the Portal Manager API OPEN TEXT Great Minds Working Together CORPORATION Copyright 2005 by Open Text Corporation The copyright to these materials and any accompanying software is owned without reservation by Open Text These materials and any accompanying software may not be copied in whole or part without the express written permission of Open Text Open Text Corporation is the owner of the trademarks Open Text Great Minds Working Together Livelink and MeetingZone among others This list is not exhaustive All other products or company names are used for identification purposes only and are trademarks of their respective owners All rights reserved Open Text Corporation provides certain warranties and limitations in connection with the software that this document describes For information about these warranties and limitations refer to the license agreement entered into between the licensee and Open Text Corporation Contacting Us Corporate Headquarters Open Text Corporation 185 Columbia Stree
7. look and feel of a website fitting in with the total website design In the WCM system the fact that metadata are stored for each content object provides sufficient information for navigating For each content object the program stores details of those objects that can be reached by hyperlink and those objects from which the active content object can be reached by hyperlink Further information for navigation is provided by the topic tree and by linking a content object to a template object If the underlying metadata change the content changes automatically without any need for manual modification As a result these navigation elements do not get out of date when objects are deleted copied or moved Personalization Personalized websites are websites that are individually prepared and displayed depending on the user Such user specific content may be desirable for several reasons 34 Livelink WCM Server Concepts It may be necessary to withhold certain information from some users A static system such as Livelink WCM Server can prevent users without sufficient rights from accessing content but this does not prevent users from learning of the existence of objects for which they have no access rights Personalized pages can also be used to provide user specific individual settings preferences etc or the user s current context An e commerce shopping cart system is a typical example users only see their personal shoppin
8. Creating WCM Objects via an HTML Form on page 149 Creating Users in an LDAP System via a Portal Internet portals usually require users to specify their identity For this purpose the users create a user accounts with their personal data in the portal By means of this account users can tailor the layout of the portal to their wishes and needs Moreover it is possible to control which content provided by the portal the users may access The user data can be stored in a database or an LDAP directory service This section describes how to create new user accounts in an LDAP direc tory service via a portal by means of the DirectoryRepository of the Portal Manager API The required data can be taken from login forms This way portal users can create and manage their accounts themselves It is also possible to develop JSP applications for managing user accounts Such web applications potentially offer more functionality than the Admin client because any data can be stored and managed in them Portal Manager API Programmer s Manual 133 Chapter 5 Requirements m To enable a user whose account is created in the LDAP directory service to log in to the WCM system and thus become part of the access control the WCM user administration must be based on LDAP The newly created user accounts must be available from the Administration server master or proxy that performs the login procedure for the Content server running in the context
9. and methods of the Java programming interface WCM Java API which makes it possible to use the functionality of the WCM servers via external programs m Javadoc Here you will find the complete documentation on the classes of the Portal Manager API Portal Manager API Programmer s Manual 13 Chapter 1 Livelink WCM Server offers flexible programming interfaces for using the core functionality of Livelink WCM Server via external programs The following table provides an overview of the different interfaces and the available functions Table 1 Available functions of the Livelink WCM Server APIs AdminHandler a read only by means of VipUserBean AttributeHandler s s by means of by means of VipWebsiteBean VipWebService_ Port EventDispatcher MailHandler va by means of VipEMailBean ObjectHandler vi vi by means of by means of VipObject VipWebService_ HandlerBean Port ObjectLoader SystemHandler 14 Livelink WCM Server Introduction WorkflowHandler s S oY by means of by means of VipWorkf low VipWebService_ Bean Port DeploymentHandler y VA ContextHandler s s LivelinkAdmin Pi S Handler by means of LivelinkUser Bean LivelinkObject s y Handler by means of LivelinkObject Bean Portal Manager API Programmer s Manual 15 Chapter 1 Typographic Conventions The following conventions are used in the text to draw attent
10. m retrieving localized messages for the key m retrieving Locale specific date and number formats The SessionBean class Full name de gauss vip portalmanager SessionBean A SessionBean manages user profiles on the basis of the unique session ID The term session bean refers to a bean that realizes a session related user administration However it should not be confused with the session beans that are part of the Enterprise Java Beans A session ID can either be specified as a string or as an HTTP request Before a user has been authenticated by a login process the user will be treated as an anonymous user with very limited rights Users are not automatically logged in by the SessionBean class It is possible to log out a user explicitly The VipProf ile interface Full name de gauss vip portalmanager VipProfile You can use the interface VipProfile to store and manage additional information on users The Content client uses VipProfile to perma nently store a user s configuration information VipProfi le also offers the possibility to store and manage non WCM information such as a user s address To retrieve a user s VipProfile call the method SessionBean getCurrentUserProfile String from the SessionBean The user ID must be supplied with the call Within VipProfile user information is managed and if necessary stored as key value pairs That means that a Value can be stored with a certain key Portal Manager API
11. tent complex methods Furthermore these methods should be simple and reflect the possibilities of the application on which they are based as naturally as possible Finally you should use the bean methods in a JSP script whenever possible although access to the application and even the reposito ries is of course always possible The basic implementation is designed in such a way that the user interface can be presented in different languages m In order to be able to control an external program via the browser you must design an HTML page with a JSP script The HTML page must use the bean that originated previously and must be an WCM managed object It is therefore necessary to integrate the HTML page in the website to be used for reaching the underlying external program Following the described design specifications automatically results in the architecture typical of the Portal Manager API which has already been described The following figure illustrates the relevant section slightly modified 48 Livelink WCM Server JSP Script External Application Fig 6 Principal class design in the Portal Manager API Portal Manager API Programmer s Manual Concepts 49 50 Livelink WCM Server CHAPTER 3 Managing the Portal Manager API This chapter provides information on the Portal Manager API configura tion It also contains information on using an LDAP directory service and locating errors The
12. the dynamic components of for example a JSP page are converted into static components The result is pure HTML without Java code Portal Manager API Programmer s Manual 181 182 Livelink WCM Server Index A absolute urls special attribute 40 add application 67 repository 54 Application interface 112 application examples creating users in LDAP via a portal 133 dynamic navigation elements 142 HTML form 149 multi content page 146 Applicationlmpl class 113 applications 111 add 67 assign repository 81 assign repository during setup 70 assign to Content server 84 class name 68 delete 84 framework 152 implement 153 internationalization 165 introduction 22 language 69 logical name 68 manage 65 parameters of supplied applications 73 resources 71 set parameters 72 architecture Portal Manager API 19 authentication 127 B Base class 110 basic classes 97 basic data types 98 filtering and sorting 100 repositories 106 RepositoryMap 102 basic data types 98 beans 114 C class description 97 class diagrams 95 classes Applicationimp 113 Base 110 FormData 37 Internationalization 116 RepositoryEntry 103 Repositorylmp 108 RepositoryMap 104 SessionApplication 116 SessionBean 117 VipObjectBean 120 VipObjectFilterBean 123 VipObjectHandlerBean 45 121 VipUserBean 120 VipWhatsNewBean 124 content dynamic 33 content objects placing several 35 Content server in applicat
13. 152 157 159 160 167 173 173 175 175 177 179 183 List of Figures Fig 1 The layer model of the Portal Manager API 20 Fig 2 The layer model of the Portal Manager API with session and application scope 23 Fig 3 Structure of a minimum system 28 Fig 4 Distributed WCM system with separate databases 30 Fig 5 The life cycle state of a WCM object 45 Fig 6 Principal class design in the Portal Manager API 49 Fig 7 The Configuration items 51 Fig 8 Overview of available repositories 53 Fig 9 Adding a repository 54 Fig 10 Adding a parameter for a repository 56 Fig 11 Applications assigned to a repository 63 Fig 12 Structure below the tree item Repositories 64 Fig 13 Overview of available applications 66 Fig 14 Defining basic application data 68 Fig 15 Quit wizard 69 Fig 16 Assigning a repository to an application during setup 70 Fig 17 Assigning resources when adding an application 71 Fig 18 Adding a parameter for an application 73 Fig 19 Repositories assigned to an application 82 Fig 20 Structure below the tree item Applications 83 Fig 21 Applications assigned to a Content server 85 Fig 22 The DirectoryRepository with its parameters 89 Fig 23 Representation scheme for class diagrams 96 Fig 24 Multi level key value lists in the TupelMap 99 Fig 25 The basic classes in the entire class diagram 100 Fig 26 The
14. Interfaces of the Portal Manager API Parameter Meaning vip admin secure Indicates whether the communication with the master Admin server is to be encrypted Possible values are true encrypted communication false non encrypted communication vip installdir The installation directory of the WCM system Applications Programs are described by the Application interface The Application interface is implemented by the abstract basic class ApplicationImpl On this basis two concrete implementations of the Application interface are provided for the integration of Livelink WCM Server However these do not contain any further methods New classes that implement the Application interface for other external programs should also be derived from the abstract basic class Class diagram The following figure shows the relevant section of the entire class diagram Portal Manager API Programmer s Manual 111 Chapter 4 abstract class ase e interface Application i abstract class ApplicationImpl class VipObject Application class VipUser Application Fig 31 The application classes in the entire class diagram The Application interface 112 Full name de gauss vip portalmanager application Application The Applicationinterface represents a program in the Portal Manager API This interface determines in particular that a program is based on one or more repositori
15. Key interface The attribute values implement the Value interface This interface enhances the Comparable Cloneable and Serializable interfaces as shown in figure 25 The basic classes in the entire class diagram on page 100 Object data can be represented as attribute value pairs and can thus be managed by the Portal Manager API For further information on this topic please refer to the WCM Java API Programmer s Manual Key Values Keys Since both the class TupelMap and the class RepositoryMap basically describe the assignment of keys to data values a Key interface was intro duced However any class can be used as a key in the repository as long as they implement the Key interface Data Values Values The values to be stored must correspond to the Value interface The basic data implementation supplied with the Portal Manager API contains except in one case the description Value as a suffix in the class name Classes other than those supplied can also be used here as long as they consider the Value interface The Value interface Full name de gauss lang Value The Value interface represents a data value Data values are used in the TupelMap class but not as a key for this the Key interface is available which extends the Value interface even further A data value must be comparable cloneable and serializable Thus the Value interface is based on the three corresponding interfaces 98 Livelink WCM Serv
16. Manual 119 Chapter 4 The VipUserBean class Full name de gauss vip portalmanager VipUserBean The logical name of the underlying application of this class is VipUserApplication The VipUserBean class is an interface to the user administration of Livelink WCM Server It offers methods for storing and loading the Value objects of different repositories as well as convenience methods for dealing with bookmark entries The VipUserBeanclass continues to offer methods that make it possible to represent an individual user These methods have been deprecated Instead the class VipProfile should be used In order to get a refer ence to an object of the class VipProfile use the class SessionBean The VipObjectBean class 120 Full name de gauss vip portalmanager VipObjectBean The VipObjectBean class provides read only access to all objects of the websites managed with Livelink WCM Server In particular there are several methods for retrieving the website s hierarchical structure which is determined by topic objects This can for example be used to construct navigation The VipObj ectBean uses repositories of the class VipObjectRepository to query data from the WCM system These repositories can be configured in two ways m by specifying the name of a deployment system In this case each repository represents the data of a deployment system For each deployment system a VipObjectRepository or VipObjectHandlerRepository
17. Manual 71 Chapter 3 Setting the Parameters of an Application Applications are configured by means of parameters Type and number of parameters depend on the functions of the application Parameters may be defined as nodes or as individual parameters Nodes group parameters of the same type Nodes may contain other nodes Unlike parameters they do not have a value Note Do not delete the applications that are supplied with the Portal Manager API ClickStreamApplication VipDAVApplication VipHCLApplication VIPHTMLCLientApplication VipObjectApplication VipUserApplication and WebServiceApplication The basic data of these applications should not be changed either To define parameters for an application 1 Select Configuration Applications application name gt Parameters 2 Choose New parameter on the context menu or click the corre sponding icon Ay Icon for adding a parameter aC The New node dialog box opens 72 Livelink WCM Server Managing the Portal Manager API Node Parameter Name topic default type Value TOPIC Fig 18 Adding a parameter for an application 3 Select whether you want to add a Node or a Parameter If you want to assign numerous parameters to an application we recommend that you group the parameters First add the reguired nodes and then one or more parameters below the nodes 4 If you clicked the Node radio button enter a unigue name for
18. WCM object The life cycle of a WCM object may include the following transitions which are represented by the VipObjectHandlerBean methods m The object is created in the Edit view create m For editing an object s content the object can be checked out in the Edit view and changed in an editor program checkOut m After changes have been made the object must be checked in again in the Edit view checkIn The object becomes available in the QA view by being submitting to Quality Assurance in the Edit view submit m Inthe QA view the object can be released and thus moved to the Production view release m In the Edit view the object can be released if the metadata item Direct release is set for the object and if the object has already been released once with this setting directRelease Portal Manager API Programmer s Manual 45 Chapter 2 m The object can also be rejected in the QA view and sent back to the Edit view reject m Regenerating an already released dynamic object that has been stat ified in the Production view updates the object in the Production view generatePage m Objects are deleted in the Edit view delete If the respective object has already been released the object must be destroyed in the QA view afterwards destroy However if the deletion is rejected in the QA view reject the object becomes available again in the Edit view Please refer to the Content Client User Ma
19. and listing data However instead of storing values of the type Value values of the type RepositoryEntry are stored Since a RepositoryEntry is also derived from TupelMap multi level lists are inevitably developed This is represented in the following figure 104 Livelink WCM Server Classes and Interfaces of the Portal Manager API Key RepositoryEntry key1 entry1 key2 entry2 entry3 Key Value key1 value1 key2 value2 key3 key3 value3 key4 value4 Fm VERE key4 entry4 keyn entryn Fig 29 Multi level key value lists in the repository map To filter sort and list the data of a RepositoryMap there is an iterator RepositoryIterator which can be used to run through previously filtered or sorted data The RepositoryIterator interface Full name de gauss vip repository RepositoryIterator A RepositoryIterator is an enumeration ofthe key value pairs in a RepositoryMap in which the data values are always of type RepositoryEntry By definition a new iterator is positioned before the first pair In order to access the pairs the iterator must be incre mented with one of the next methods for the first pair and the following pairs Portal Manager API Programmer s Manual 105 Chapter 4 Repositories Access to External Resources Each access to external resources application data requires on the one hand the definition of the resources such as
20. filtering and sorting classes in the entire class diagram 102 6 Livelink WCM Server Fig Fig Fig Fig Fig Fig Fig Fig Fig Fig Fig Fig Fig Fig Fig Fig 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 The RepositoryMap class in the entire class diagram Structural relations of complex data types Multi level key value lists in the repository map The repository classes in the entire class diagram The application classes in the entire class diagram The bean classes in the entire class diagram Structure of VipProfile and the managed information Configuring the trusted login mode via the Admin client Authentication and session management Login Repositories Class diagram for applications General hierarchy for developing applications The RepositoryImp1 class with all methods relevant to data sources JSP model 2 architecture Architecture of the Portal Manager API with internationalization aspects Structure of a website Portal Manager API Programmer s Manual 102 103 105 109 112 115 119 129 131 132 152 154 155 157 161 164 List of Tables Table 1 Available functions of the Livelink WCM Server APIs 14 Table 2 Functions for configuring repositories and applications 52 Table 3 Repositories and their parameters 57 Table 4 WCM Applications and their parameters 73 Table 5 Start parameters for Content servers running in the context of a JS
21. getProfileValue String profileName String attribute and VipProfile setProfileValue String profileName String attribute Value value allow you to access and manipulate the information in this section A profile name must be specified for this purpose Alternately you can use the method Livelink WCM Server Classes and Interfaces of the Portal Manager API VipProfile setCurrentProfileName String name to set the profile name which is to be used for the VIP_USER section To retrieve the name of the profile currently used for the user specific profile information you can use the method VipProfile getCurrentProfileName VipProfile TRANSIENT KNOWN USER Key1 Value1 Key2 Value2 Key3 Value3 Key2 Value2 Key3 Value3 Key1 Value1 VIP USER Key1 Value1 Key2 Value2 Profile A Key3 Value3 Key1 Value1 Key2 Value2 Profile B Key3 Value3 Key1 Value1 Key2 Value2 Profile C Key3 Value3 Database LDAP Livelink Fig 33 Structure of VipProfile and the managed information The methods VipProfile getValue String attribute int type and VipProfile setValue String attribute Value value int type are provided for accessing and manipulating indi vidual profile values This applies to all VipProfile sections The section to be used must be specified as type TRANSIENT KNOWN_USER or VIP_USER Portal Manager API Programmer s
22. host name port number program name and on the other hand the authorization information for access user name and password In the Portal Manager API the application data is modeled by reposito ries The initialization data for defining the resource URL user ID pass word and several configuration parameters is supplied to a repository as parameters The expected entries are different for each application Options for Authorization If an application requires an authorization two different ways can be chosen authorization data can either be directly supplied or centrally managed As previously described authorization data can be directly supplied in the parameters The other possibility is to perform the management centrally by means of account information login information that is stored in the Portal Manager API The account information is central and can in case there are more repositories be used by all repositories This creates a single sign on mechanism Systems that store account information can also be interpreted as applica tions Therefore it is obvious to make the repositories accessible This is realized in the Portal Manager API 106 Livelink WCM Server Classes and Interfaces of the Portal Manager API Repository Types Repositories are used for two purposes m representation of an application or the data of an application primary usage in the Portal Manager API m retrieving and checking u
23. interpreted as a bit field Each bit stands for a trace information type for example entering a method exiting a method warning message error The value 0 has the effect that no tracing is performed The filter value can also be indicated as a hex number by using 0x as a prefix the setting of all bits for bit oriented filter implementations in the logging channel can be achieved by using the value 0x7F For detailed information refer to the comments of the trace properties file trace indentspaces The number of spaces that should be output per indentation depth behind the date stamp trace width The width of the output lines The output is interrupted at word boundaries The width must have a value of at least 40 If no word wrap is to be used the value 0 should be entered trace timestamp The type of time stamp at the beginning of each line One of the four following values is allowed NO no time stamp INTERNAL time stamp in milliseconds SHORT time stamp hour to millisecond LONG time stamp year to millisecond Portal Manager API Programmer s Manual 91 Chapter 3 Entry Meaning trace format The format string for the trace output The following placeholders are possible 0 the complete name of the class calling the trace 1 the name of the class calling the trace without package name 2 the name of the method from which the trace is called 3 the name of
24. is not located in the same directory as the JSP object used for statification In this case the relative URLs are wrong To avoid this problem set the special attribute absolute urls for the JSP object to on or to any value other than SERVER_RELATIVE This generates absolute URLs on the executed JSP page When the form instance is statified these URLs are converted into relative URLs relatively to the newly generated form instance Statification of XML objects XML objects can be statified Two cases are differentiated for statifying XML objects m The XML object is assigned a form template or the special attribute generate static of the XML object has a purely numeric value Statification is performed in the same way as for form instances i e by means of a JSP page see section Statification of form instances on page 41 For each XML object the following files are generated m the unstatified page m the statified page m if required the surrogate page with a link to the XML document Portal Manager API Programmer s Manual 43 Chapter 2 Note When a form template is used the content of the unstatified page is distributed as HTML code file extension html because the form template is taken into account This means that the JSP page responsible for statification cannot directly evaluate the XML code of the XML object For this reason it is not recommendable to assign a form instance to an XML object
25. metical operations that do not relate to the design they should offload their code into JavaBeans or classes Security Aspects When designing a web application that operates with sensitive data the security aspect is particularly important Apart from aspects such as authentication encryption etc which must be implemented in the applica tion it is also important to be aware of the access for the Java Virtual Machine JVM which executes the server side software When using JSP pages it is necessary to take a closer look at the security mecha nisms of the JVM that are used within the JSP engine JVM Without SecurityManager lfno SecurityManager is explicitly set in the context of a program the JVM possesses the access rights of the user who started the program Depending on the functionality of the program this can result in serious security loopholes Possible scenarios m The application and hence also the client can navigate in the server side file system and view or modify content m The application and hence also the client may establish network connections with computers in the server side environment Portal Manager API Programmer s Manual 159 Chapter 5 In such an environment you are recommended to give the above mentioned user only those rights that are needed to ensure a correct func tioning of the application Moreover access should be prohibited to other resources especially security relevant or sensi
26. of the JSP engine or as web application in an application server m The DirectoryRepository can use all LDAP directory services that are supported by Livelink WCM Server for detailed information on the supported LDAP directory services refer to the Release Notes for Livelink WCM Server Configuring the DirectoryRepository For accessing an LDAP directory service a repository of the type DirectoryRepository must be configured Proceed as follows 1 In the Admin client create a new repository see section Adding a Repository on page 54 As class name enter de gauss vip portalmanager repository DirectoryRepository 2 Configure the new repository by means of parameters see section Setting the Parameters for a Repository on page 55 The following table contains a sample configuration For basic infor mation on the DirectoryRepository refer to section The DirectoryRepository class on page 87 The individual parame ters are described in table 3 Repositories and their parameters on page 57 134 Livelink WCM Server Notes on Programming with the Portal Manager API Notes If necessary the values of the Tdapattr parameters must be modi fied according to the configuration of the LDAP directory service Mappings must only be made for those parameters that have different values for the parameters pomaattr and ldapattr A distinction is made between upper and lower cases i e the values use
27. regulations of the software license agreement apply to this documentation All brand names and trademarks mentioned are the property of their respective owners http www opentext com bridging gauss html Program version Livelink Web Content Management Server IM Content Server 9 5 0 Document version En 01 Publication date April 2005 Table of Contents List of Figures 6 List of Tables 8 Chapter 1 Introduction 11 About this Manual 12 Typographic Conventions 16 Chapter 2 Concepts 19 The Architecture of the Portal Manager API 19 Integrating the Portal Manager API in the WCM System 24 Programming Concepts 32 Integrating External Programs 46 Chapter 3 Managing the Portal Manager API 51 Managing Repositories 52 Managing applications 65 LDAP 86 Locating Errors 89 Chapter 4 Classes and Interfaces of the Portal Manager API 95 Class Diagrams and Class Descriptions 95 Basic Classes 97 Application and Bean Classes 110 4 Livelink WCM Server Chapter 5 Appendix A Appendix B Glossary Index Notes on Programming with the Portal Manager API Authentication and Session Management Application Examples for the Portal Manager API Framework for Applications Designing a JSP Page Security Aspects Internationalization Metadata Schemes Caching Accessing WCM Objects Deployment Cache How the Cache for WCM Objects Works Caching RepositoryEntry Objects Portal Manager API Programmer s Manual 127 127 133
28. reposi tory Portal Manager API Programmer s Manual 139 Chapter 5 The method createNewUser repository name key data of the class VipUserBean makes it possible to create new users and assign them to groups and roles in just one step After a user has been assigned to a group or role the data of the group or role must be updated For this reason either the currently logged in user must have sufficient rights for this operation or the parameters principal changes and credential changes must be used together Example of creating a new user account In this JSP example the entries from an HTML form are used to create a new user account lt html gt lt head gt lt head gt lt body gt lt page import java util de gauss lang de gauss vip util de gauss vip repository gt lt jsp useBean id vub class de gauss vip portalmanager VipUserBean scope session gt lt read the parameters from the request String name request getParameter name if name null name String uid request getParameter uid if uid null uid String mail request getParameter mail if mail null mail String pwd request getParameter pwd if pwd null pwd gt lt p gt lt form action VIPURL gt lt table gt lt tr gt lt td gt Name lt td gt lt td gt lt input name name value lt name gt gt lt td gt lt tr gt lt tr gt lt td gt
29. repository 54 P parameters define for a repository 55 define for an application 72 supplied applications 73 VipDAVApplication 74 VipHCLApplication 75 VipHTMLClientApplication 76 VipObjectApplication 79 VipUserApplication 79 WebServiceApplication 80 personalization 34 placing several content objects 35 portal create users in LDAP 133 Portal Manager API application examples 133 architecture 19 integration 24 staging 44 profile 117 R repositories 106 add 54 assign application 62 Index class name 55 define parameters 55 delete 65 introduction 23 login repositories 107 manage 52 name 55 types 107 RepositoryEntry class 103 RepositoryEntrylterator interface 104 Repositorylmpl class 108 Repositorylterator interface 105 RepositoryMap 102 RepositoryMap class 104 S security aspects 159 SecurityManager JVM with 160 JVM without 159 session 21 108 session beans 21 session management 127 130 SessionApplication class 116 SessionBean class 117 sorting 101 special attributes statification 38 staging 44 start Content server in application server 31 statification 38 absolute_urls special attribute 40 generate_static special attribute 39 of form instances 41 of JSP objects 41 of XML objects 43 Portal Manager API Programmer s Manual 185 Index timeout special attribute 39 WebServiceApplication system architecture parameters 80 master Administration server 26 master Content
30. server 26 minimum system 27 proxy server 26 separate data storage 28 T timeout special attribute 39 trace properties 89 U users create in LDAP via a portal 133 V Value interface 98 VipDAVApplication parameters 74 VipHCLApplication parameters 75 VipHTMLClientApplication parameters 76 VipObjectApplication parameters 79 VipObjectBean class 120 VipObjectFilterBean class 123 VipObjectHandlerBean class 45 121 VipProfile Interface 117 VipUserApplication parameters 79 VipUserBean class 120 VipWhatsNewBean class 124 W WCM object life cycle 45 186 Livelink WCM Server Index Portal Manager API Programmer s Manual 187
31. that access certain services in the WCM system They allow access to the data of the managed objects as well as to administrative data This enables access to object content object metadata user group role and functional area data Support is also provided for filtering and sorting the data of the WCM system 24 Livelink WCM Server Concepts Portal Manager API and Deployment Systems When a repository is used to access object data the data of a certain deployment system is accessed A deployment system is specified in the configuration of each repository that can be used to access object content and metadata When you create a new website via the Admin client the repositories for all deployment systems of the new website are generated automatically The Portal Manager API can access the data of any deployment system The only requirement is that the respective deployment systems use the same data storage as the Content server running in the context of a JSP engine or as web application in an application server For accessing objects with WebDAV capable clients a servlet is used that requires the Portal Manager API Portal Manager API and Data Storage The Portal Manager API requires access to both the data of deployment systems e g the generated URLs of objects and to the WCM objects themselves via repositories Access to the WCM objects is required for reading the metadata and for processing them for applications and program
32. the node If you clicked the Parameter radio button enter a name and a value for the parameter 5 Click the OK button The following table gives you an overview of the parameters expected by the applications supplied with the Portal Manager API Table 4 WCM Applications and their parameters ClickStreamApplication none none Portal Manager API Programmer s Manual 73 Chapter 3 Application Parameter Description VipDAVApplication import indexfile name Specifies the name of index files in directories When new resources are created files with this file name are interpreted as index files independent of the file extension The content of these files is integrated in the index file of the respective collection Default value index lock cleanup interval Specifies the interval in milliseconds for searching for expired locks Default value 600000 corresponds to 10 minutes lock infinite timeout Specifies the maximum expiration interval for a lock Default value 86400000 corresponds to 24 hours topic default type WebDAV makes it possible to add collections directories WCM objects of a certain topic type This parameter specifies the topic type of objects that are created by the WebDAV command MKCOL Default value TOPIC vip default attributes Specifies the name of the WCM metadata that can be queried via the WebDAV interface Default value
33. the Portal Manager API in the system architecture of a WCM system 12 Livelink WCM Server Introduction m Chapter 3 Managing the Portal Manager API describes how to configure the Portal Manager API by means of applications and repositories The chapter also contains notes on LDAP m Chapter 4 Classes and Interfaces of the Portal Manager API contains a description of the programming interface that the programmer must be familiar with in order to create JSP pages m Chapter 5 Notes on Programming with the Portal Manager API offers an introduction to the Portal Manager API s programming inter faces as well as a few application examples m Appendix A Metadata Schemes compares the metadata schemes of version 5e and version 8 m Appendix B Caching describes the caching behavior of the Portal Manager API The programming interface described here is a component of Livelink WCM Server In addition to this Programmer s Manual the following sources provide information m Livelink WCM Server Installation Manual This document describes the installation of the WCM system and contains information on the configuration of web server and application server m Livelink WCM Server Administrator Manual This document describes the configuration and administration of a WCM system from the point of view of an administrator m WCM Java API Programmer s Manual This document contains information on interfaces classes
34. versions HTML JSP page graphics etc available The JVM that runs the JSP engine has a default Locale setting m The WCM beans and WCM applications are Locale specific The default language setting for an application and the respective bean is specified in the Admin client see section Managing applications starting on page 65 Note The default Locale for the SessionBean is determined by the default language of the logged in WCM user Recommendation for Internationalizing a Portal Manager API Solution On the basis of the architecture described in section Architecture of the Portal Manager API and Internationalization on page 161 international ization can be carried out according to the following strategy the client that uses the solution is the recipient of all information and the entire content It therefore specifies its preferred language or localization All 162 Livelink WCM Server Notes on Programming with the Portal Manager API other system components must modify their behavior to suit the clients choice This strategy results in the following technical recommendations m Users can define their preferred language in the browser This prefer ence is sent in the header of every HTTP request and can be retrieved by the web server and by the JSP engine The choice of language according to RFC 1766 and ISO 639 can be retrieved from the servlet request m The URL can be dynamically created and
35. window pane 62 Livelink WCM Server Managing the Portal Manager API 4 Configuration Name x EH MG Pools ClickStreamapplication 4 Custom connection types 2 m E Servers Websites Tea Deployment systems m 45 Server agents m E Utilities E Repositories Q ClickStreamRepository ci Applications H Parameters Fig 11 Applications assigned to a repository Assigning an application to a repository To assign an application to a repository 1 Select Configuration gt Repositories repository name gt Applications 2 Choose Assign application on the context menu or click the corre sponding icon EN Icon for assigning an application to a repository The Select application dialog box opens It shows a list ofthe appli cations not yet assigned 3 Mark the desired application s 4 Click the OK button Removing the assignment of an application to a repository To remove the assignment of an application to a repository mark the respective application in the right window pane Choose Remove assignment of application on the context menu or click the corresponding icon Portal Manager API Programmer s Manual 63 Chapter 3 EN Icon for removing the assignment of an application to a repository Structure Below the Tree Item Repositories Each repository has the nodes Applications and Parameters If you have assigned applications or parameters to a repository these e
36. API The DirectoryRepository class The DirectoryRepository class implements the access to an LDAP directory server This is an alternative way of accessing LDAP indepen dent of the LDAP connection of a master Administration server The DirectoryRepository can be used to load data from the LDAP server and to store data there For an application example refer to section Creating Users in an LDAP System via a Portal on page 133 The DirectoryRepository can be configured by means of parameters Configuration involves for example specifying a search node base for searching and loading existing entries and adding new entries Each access to the LDAP directory service requires an authentication of the respective user To be able to add new entries the user must have admin istrator rights for the LDAP directory service The DirectoryRepository class can be used for the authentication of users for the Portal Manager API since it implements the LoginRepository interface If write access to the WCM system is required or if the requested objects cannot be read by all users the user must log in using the VipUserRepository For this login the user is assigned a context ID which the WCM system requires for checking the rights Using a DirectoryRepository for user administration in the Portal Manager API requires the integration of additional object classes and attributes in the LDAP directory service These settings must also be made when L
37. Application interface on which basis concrete Application classes can be developed without great effort ApplicationImp1 does not have a public constructor Beyond the methods defined in Application only the method getInstance exists as a surrogate for a constructor whereby the factory pattern is implemented At the first call of the method getInstance String ApplicationImp1 automatically starts the Content server running in the context of a JSP engine or as web application in an application server If you want to start the Content server explicitly use the method startPMServer of the Base class The class ApplicationImp1 uses the following conventions for its own initialization Portal Manager API Programmer s Manual 113 Chapter 4 m The settings of the application are read from the configuration file application xml The configuration file server xml contains a mapping of the logical application names to existing application names m Each repository which needs an ApplicationImpl is read through the settings of the configuration file repository xml These configuration files contain all information that allows creating Application objects as factory In this way supplying concrete Application implementations with initialization data is considerably facilitated Beans The beans made available in the Portal Manager API can be used as instances in JSP scripts They make it possible to access any program through HTML pa
38. Fig 30 The repository classes in the entire class diagram Portal Manager API Programmer s Manual 109 Chapter 4 Application and Bean Classes Basic Class Bean classes application classes and repository classes are derived from the basic class Base This class implements several interfaces and extends an external CoreObject class The Base class Full name de gauss vip portalmanager core Base Base is an abstract basic class of all applications and repositories In addition the Base class contains the methods for loading properties and multi properties files Base also contains the static method startPMServer which you can use to start Content servers running in the context of a JSP engine or as web application in an application server If these Content servers have already been started a call of the method remains without effect The following parameters must be set as system properties Table 5 Start parameters for Content servers running in the context of a JSP engine Parameter Meaning vip server name The name ofthe Content server running in the context of a JSP engine or as web appli cation in an application server vip admin host The name ofthe computer on which the master Admin server is running vip admin socket The socket port of the master Admin server vip admin http The HTTP port of the master Admin server 110 Livelink WCM Server Classes and
39. Fil ter interface full name de gauss vip lang filter Filter for which several implementa tions are available Complex filters can be combined from simple filters as in a construction set For more detailed information on this topic please refer to the WCM Java API Programmer s Manual 100 Livelink WCM Server Classes and Interfaces of the Portal Manager API Sorting Sorting is generally described by the Sort interface full name de gauss lang Sort The KeySort class is the only implementation of the Sort interface This class is used to define a sort criterion for the RepositoryEntry objects contained in a RepositoryMap see section RepositoryMap and associated classes starting on page 102 The KeySort class contains the appropriate key and sort order The key deter mines the sort criterion ofthe RepositoryEntry objects The RepositoryEntry objects are compared on the basis of the value they contain for the specified key Example A RepositoryMap contains three objects of the RepositoryEntry class For the key A the first RepositoryEntry contains the value Benjamin the second RepositoryEntry contains the value Charlie the third contains the value Alfred When the key A is applied the KeySort class sorts the RepositoryEntry objects in the following order third RepositoryEntry first RepositoryEntry second RepositoryEntry An example of how the KeySort class is used can be found in the code
40. I18n You can also use this object to internationalize your own beans and applications The class de gauss vip i18n Internationalization makes the following functionality available m Loading ResourceBundle objects Obtaining keys from a specific ResourceBundle m Obtaining Locale specific date and number formats Portal Manager API Programmer s Manual 165 166 Livelink WCM Server APPENDIX A Metadata Schemes Compared with version 5e the metadata names and data types have remained unchanged in order to ensure downward compatibility with previous versions of the Portal Manager API When configuring a VipObjectRepository ora VipObjectHandlerRepository you can enter which metadata scheme is to be used see table 3 Repositories and their parameters on page 57 The following table compares the metadata schemes of version 5e and version 8 Metadata scheme in version 5e Metadata scheme in version 8 Attribute Value Attribute Value acl VipAclValue acl Acl author StringValue created by User date created DateValue date created DateValue date expire DateValue date expire DateValue date release DateValue date released at DateValue date released DateValue date released DateValue direct release StringValue direct release BooleanValue Portal Manager API Programmer s Manual 167 Appendix A
41. OGIN pomaattr trustedLogin ldapattr VIP_FUNCAREAS trustedLogin pomaattr ldapattr vipFuncarea vipFuncarea VIP RIGHTS pomaattr vipRights ldapattr vipRights LANGUAGE pomaattr language ldapattr preferredLocale EJ LDAP_VIP_TYPE pomaattr vipType ldapattr vipType VIP WEBSITES pomaattr website ldapattr vipWebsite HCL_PROFILES pomaattr helProfiles ldapattr hclProfiles Portal Manager API Programmer s Manual 137 Chapter 5 Parameter Value EJ MAIL pomaattr email ldapattr mail VIP MEMBERS pomaattr user name ldapattr member VIP_SUBSTITUTE pomaattr vipSubstitute ldapattr vipSubstitute USER PASSWORD pomaattr userpassword ldapattr userPassword 3 Assign the new repository to the application VipUserApplication see section Assigning a Repository to an Application on page 81 Methods for using the DirectoryRepository For accessing the data of the LDAP directory service and changing them the following methods are available The class VipUserBean inherits them from the class Obj ectBean m containsKey lt repositoryName gt key m createEntry lt repositoryName gt key data m loadEntry lt repositoryName gt key 138 Livelink WCM Server Notes on Programming with the Portal Manager API m removeEntry lt repositoryName gt key m storeEntry lt repositoryName gt
42. P engine 110 Table 6 Sample configuration of a DirectoryRepository 135 8 Livelink WCM Server Portal Manager API Programmer s Manual 10 Livelink WCM Server CHAPTER 1 Introduction The Portal Manager API is part of Livelink Web Content Management Server Livelink WCM Server for short By purchasing Livelink WCM Server you have acguired a powerful Content Manage ment System which you can use to build maintain and manage complex and distributed websites The Portal Manager API enables you to create and manage dynamic content for your website thus allowing you to develop enterprise portals Furthermore the Portal Manager API forms the basis for personalizing websites The Portal Manager API can be integrated in application servers which conform to the J2EE specification and offers the possibility of dynamic load balancing and session fail over It also functions as a platform for Enterprise Application Integration EAI The Portal Manager API is the basis for a multitude ofconnectors that you can use to establish a connec tion to third party products The Portal Manager API is not a product that gives you a finished web portal after installation You should consider it as a framework that helps you create web portals and that provides support in coming up with neces sary solutions to problems A seamless integration with Livelink WCM Server is guaranteed The Portal Manager API allows you to quickly develop dyn
43. Programmer s Manual 117 Chapter 4 118 VipProfile provides three sections for user information transient profile information VipProfile TRANSIENT This section is used to store profile information which must be available during a user session but which is not to be stored persistently Transient profile data from VipProfile can be read and manipulated even ifthe corresponding user is not logged in to the WCM system client related profile information VipProfile KNOWN USER This section is used to manage and store user information which is to be stored persistently The data is saved in a cookie Thus the data in this section is only available on the client browser which stores the cookie By default the life span of the cookie is limited to 90 days You can however change this default by means of the KNOWNUSER COOKIE DURATION parameter of the VipUserApplication class user specific profile information Vip Profile VIP USER This section is used to persistently store and manage user infor mation which is to be available in the whole system Depending on the kind of user administration this profile information is stored ina database an LDAP directory service or in Livelink To read and manipulate data from this section the corresponding user must be logged in to the WCM system Within this section the user information must be stored and managed in sub profiles which must have unigue names The methods VipProfile
44. User Id lt td gt lt td gt lt input name uid value lt uid gt gt lt td gt lt tr gt lt tr gt lt td gt E Mail lt td gt lt td gt lt input name mail value lt mail gt gt lt td gt lt tr gt 140 Livelink WCM Server Notes on Programming with the Portal Manager API lt tr gt lt td gt Password lt td gt lt td gt lt input name pwd type password value lt pwd gt gt lt td gt lt tr gt lt tr gt lt td gt amp nbsp lt td gt lt td gt lt input type submit value create user gt lt td gt lt tr gt lt table gt lt form gt lt p gt lt hr gt lt if name length gt 0 amp amp uid length gt 0 amp amp pwd length gt 0 RepositoryEntry newUserEntry new RepositoryEntry 0 add the common name newUserEntry putValue AttributeName CN new StringValue name add the user id newUserEntry putValue AttributeName UID new StringValue uid add the mail address newUserEntry putValue AttributeName MAIL new StringValue mail add the password newUserEntry putValue AttributeName PWD new StringValue pwd allow WCM access newUserEntry putValue AttributeName ACCOUNT new BooleanValue true define a language newUserEntry putValue AttributeName LANGUAGE new LocaleValue Locale getDefault the user does not have to change his password newUserEntry putValue AttributeName PWD CHANGE new BooleanValue false no trusted login allow
45. VipObjectHandlerBean performs among other things the following actions on the form instances 150 Livelink WCM Server Notes on Programming with the Portal Manager API m Create m Change m Submit m Reject m Release m Delete The input form is called from the overview page The user enters the form data and sends off the form The contents of the form are passed to the JSP page for creation The JSP page extracts the form entries from the HTTP request and generates the metadata and the content for the form instance The form instance must then be created as a WCM object and its content must be written If an existing form instance is to be edited it is loaded into the edit form from the overview form The user edits the data and sends the form off again Unlike creation of form instances the contents of the form are passed to the JSP page for editing This extracts the form data and updates the metadata and content of the form instance that is to be edited The remaining actions that can be performed from the overview page are less spectacular They merely involve calling the relevant Obj ectHandler for the form instance and updating the overview page Portal Manager API Programmer s Manual 151 Chapter 5 Framework for Applications This section describes the framework used to implement user specific applications The Portal Manager API provides a number of Java classes that can be used to integrate user specific a
46. ache the cache determines which object is removed from the cache If when the configured cache reduce interval is reached the size of the cache is greater then specified in the minimum size parameter the cache automatically removes objects until the minimum size is reached This process is repeated at the configured interval 176 Livelink WCM Server Caching If you want to ensure that many objects are stored in the cache set the minimum size to a high value This prevents the objects from being removed from the cache too early The maximum size must be adapted accordingly On Content servers with Production view in particular it is recommendable to store the majority of objects in the cache during opera tion Caching RepositoryEntry Objects The representation of metadata on the Content server running in the context of a JSP engine or as web application in an application server the so called extemal representation is realized by RepositoryEntry objects The external representation is partly different from the internal representation of the data To keep the conversion effort at a minimum level each object in the cache has its own cache for storing RepositoryEntry objects If an object is removed from the cache the corresponding RepositoryEntry objects are removed as well When the Content server requests a RepositoryEntry the WCM object checks whether the desired attribute combination already exists in its cache and pro
47. aged with Livelink WCM Server The VipObjectHand1lerBean is the interface of the Portal Manager API to the WCM Java API Portal Manager API Programmer s Manual 121 Chapter 4 The available methods are almost identical to the methods of the ObjectHandler interface of the WCM Java API The ObjectHandler is the central instance of the WCM Java API for manipulating a website via the program All techniques limitations constants etc described in the WCM Java API Programmer s Manual are therefore also valid for the VipObjectHandlerBean Therefore knowledge of the ObjectHandler methods is essential The name of the underlying application of this bean is VipObjectApplication The repositories that use this application are entered in the configuration files application xml and repository xml These repositories can be configured in two ways m by specifying the name of a deployment system A deployment system is responsible for exactly one website and one data storage view Edit QA Production Therefore by selecting a deployment system for a repository you specify exactly which data will be returned and which objects are affected With the method setRepositoryName String you can specify which VipObjectHandlerRepository is to be used by this bean to carry out operations in the WCM system m by specifying the website name and the data storage view of the website Edit QA Production This makes it possible to access the obj
48. amic components that are internally consistent in line with your own ideas and that meet the demands of modern websites Portal Manager API Programmer s Manual 11 Chapter 1 Important Incorrect use of the programming interface described in this manual may lead to errors in the WCM system including system crashes and data loss Incorrect programming can also cause problems concerning performance and system resources For this reason it is essential to test the developed software with regard to correctness stability robustness and performance before putting it to productive operation Gauss Interprise AG cannot assume any liability for the correct function ality of the developed software Our Professional Services Group can help you plan and implement solutions This may help you avoid prob lems right from the start About this Manual The Portal Manager API and hence this document are designed for indi viduals with sound technical know how The following requirements should be satisfied m knowledge of the product Livelink WCM Server preferably not only as user but also as administrator m technical understanding of the processes involved in using JSP pages and servlets m general programming experience Java programming experience and familiarity with HTML The contents of this manual are organized as follows m Chapter 2 Concepts explains the basic concepts of the Portal Manager API and the integration of
49. ances to which this JSP object is assigned are regen erated and statified each time the JSP object is changed The JSP object determines the layout and presentation of the data from the form instance If no OID is stored in the special attribute generate static the deployment system generates the unchanged content of the form instance in the form of XML code When a deployment system is created in the Admin client you determine how the references in the WCM objects are converted into URLs The following options exist m absolute Absolute paths are used in the links Example lt a href http www company example products NewProducts htm gt m relative Relative paths are used in the links Example lt a href NewProducts htm gt m server relative Relative references without specification of protocol and base URL are used in the links 42 Livelink WCM Server Concepts Example lt a href products NewProducts htm gt In the metadata dialog of the Content client you can overwrite the setting in the Admin client by means of the special attribute absolute_urls Deployment systems created with the option relative calculate the refer ences that the JSP object contains relatively to the path of the JSP object When the JSP object is executed for statifying a form instance the relative URLs are written to the static code of the form instance where they are no longer adapted This causes problems if the form instance
50. atified pages can be acti vated During this analysis the OIDs for the WCM URLs used on the pages are saved in the database If the URL of a referenced object changes the respective pages are automatically regenerated and statified For detailed information on the configuration of deployment systems refer to the online help of the Admin client 38 Livelink WCM Server Concepts Object type Only objects whose object type is assigned to the attribute set dynamic can be statified These are the following object types JSP page JSP topic and JSP template Form instance and Form template XML document XML template XSLT document and XSLT template Special Attributes The following attributes are important for statification of objects m generate_static The special attribute generate_static is used to control the object dependent statification see section Object Dependent Statification on page 40 In the Content client this attribute is called Statify page timeout If the code of a dynamic page is to be converted into static code the respective page is first generated as temporary page This temporary page is executed via a URL connection The result of this execution is stored as final static page When configuring the deployment system in the Admin client you set the waiting time in milliseconds for establishing the URL connection to the te
51. bsite that use different data storages must be accessed via different Content servers m The available view of a website s data and the possible actions depend on the routing settings of the Content server If changes to a website s data are to be performed by the Content server for example via the Content client the Content server must receive the Edit view of the data in which case the Content server would have access to all three views of the website Due to the flexible system architecture of Livelink WCM Server there are numerous possibilities of setting up a WCM system The Livelink WCM Server Administrator Manual contains detailed information on this topic In the following sections two scenarios for integrating the Portal Manager API ina WCM system are described Minimum System The WCM system consists of a master Admin server and a master Content server The master Content server is executed in the context of a JSP engine or as web application in an application server Thus the Portal Manager API which is required for editing websites with the Content client is available on the master Content server The website InternetSite is created on the master Content server The website objects are distributed to different directories via three deploy ment systems Edit QA and Production Thus the complete staging is realized on the master Content server In the figure DS is used as abbreviation for deploymen
52. button 82 Livelink WCM Server Managing the Portal Manager API Removing the assignment of a repository to an application To remove the assignment of a repository to an application mark the respective repository in the right window pane Choose Remove assignment of repository on the context menu or click the corresponding icon al Icon for removing the assignment of a repository to an application Structure Below the Tree Item Applications Each application has the nodes Repositories and Parameters If you have assigned repositories or parameters to an application these entries will appear below the respective node in the figure below a parameter was assigned to the VipHCLApplication Ay Configuration HF 2 Pools FH tk Custom connection types E yy Websites Tea Deployment systems VipDAVApplication VipHCLApplication Repositories E Parameters hel servleturl VIPHTMLClientApplication VipObjectApplication VipUserApplication E WebServiceApplication Fig 20 Structure below the tree item Applications Portal Manager API Programmer s Manual 83 Chapter 3 Deleting an Application To delete an application 1 Select Configuration Applications 2 Mark the desired application in the tree on the left 3 Choose Delete application on the context menu or click the corre sponding icon Icon for deleting an application g pp 4 Confirm the deletion with Yes The configura
53. cts This bean also provides the method getContent which returns a ContentHandler This class can be used to access specific items in the content e g specific attributes in form instances The content is loaded via a URL connection i e dynamic pages are executed before they are returned The methods require a RepositoryEntry as parameter The framework of the Portal Manager API provides you with numerous methods of determining a RepositoryEntry indirectly If you know the object ID of a content object however you can determine a RepositoryEntry directly with the method getEntry of the class VipObjectBean Creating WCM Objects via an HTML Form Using the Portal Manager API you can develop HTML forms that can be used for form based content creation A form based entry is always advantageous if large numbers of similar content objects are to be created and the responsible users need a simplified user interface for implementa tion Although the Content client for example is very easy to use it provides a wide scope of functionality Only a small proportion of these functions are needed for creating simple identically structured documents such as article pages and press releases Making these functions available through a form considerably reduces familiarization time for the user Portal Manager API Programmer s Manual 149 Chapter 5 This is important for example if external resources are to be integrated in the website crea
54. d removing assignments see section Assigning a Repository to an Application on page 81 m deleting an application see section Deleting an Application on page 84 m assigning an application to a Content server see section Assigning an Application to a Content Server on page 84 Adding an Application To add an application 1 Select Configuration Applications 2 Choose New application on the context menu or click the corre sponding icon Icon for adding an application g pp 3 Follow the instructions of the wizard Defining Basic Data In the first dialog boxer you define the basic data of the application Portal Manager API Programmer s Manual 67 Chapter 3 68 new application XI Basic data Give a unigue name tothe application assign a Java KJ class to it enter a logical name and select a language Y Name Class name Logical name Language English USA X Fig 14 Defining basic application data Name The name of the application must be unique and start with a letter You cannot change the name subsequently Class name name of the application s Java class The class loader uses this name to load the class It is expected that the class imple ments the application interface and has an empty public constructor Logical name The logical name of the application is the name the Portal Manager API uses t
55. dy contains some applications that have been implemented to control internal access to Livelink WCM Server However additional individual implementations must be developed if external applications such as e commerce solutions are intended to be controlled using the Portal Manager API Applications provide access to data sources The concept provided in the Portal Manager API for processing the data of an application is based on the use of repositories Repositories are modeled by the basic classes that are described in chapter 4 Classes and Interfaces of the Portal Manager API In the Portal Manager API applications are defined in the broadest sense as a collection of abstract access processes which standardize the view of programs New concrete applications can be easily integrated by using the application interface Using this interface is not mandatory but it makes available the full functionality of the session beans In contrast to session beans the lifetime of resources in applications is unlimited Applications do not know sessions There is only one single resource context that begins with the application s runtime start and finishes when the runtime ends If necessary the application is instanti ated by the bean and stopped by the server side process Java Virtual Machine The following figure shows where the borderline between session and application scope lies 22 Livelink WCM Server Concepts JSP Scri
56. dy gt lt html gt Placing Several Content Objects on one Page Multi Content Page With the Portal Manager API you can present as many content objects texts tables graphics etc as you like on one page It is of Course necessary to take account of restrictive aspects such as access rights The objects you use as content may be objects of the WCM managed website or data from external programs Even inter website and inter program content links are no problem at all The multi content page approach is particularly suitable for sophisticated websites where responsibility for content creation and content provision is usually divided between different staff For example product descriptions may be written by copy writers the illustrations are supplied by a photo agency and product data such as name article number price and delivery period is entered in a database by the purchasing department 146 Livelink WCM Server Notes on Programming with the Portal Manager API Design A multi content page is created as a JSP page by means of the methods of the Portal Manager API This requires even at this early stage a division of labor between web designer and programmer Sketch the layout of the multi content page on a sheet of paper Since it is advisable to arrange the content objects with the aid of HTML tables you should determine the exact position and size of the tables before going any further Implementation
57. e statified orneither the code of the JSP template nor the code of the object may be statified Statification of form instances Statification of form instances is always object dependent If in the Admin client statification was set to always for a deployment system it is not possible to create edit or statify form instances by means of a JSP page in this deployment system In a deployment system with such a configuration you cannot work with forms in a useful way Portal Manager API Programmer s Manual 41 Chapter 2 Although the special attribute generate static is also analyzed for the statification of form instances a different algorithm is used than with JSP objects form instances are statified by means of a JSP object that must be specified The OID of the JSP object that takes over the actual statifica tion is located in the special attribute generate static If this special attribute does not have a value in a form instance the system checks the instance s form template to see if such a value exists If this is the case the value is used for statification The OID of the form instance is sent to the determined JSP object for statification Afterwards the result usually an HTML page is generated by the deployment system References from other objects to the form instance are automatically mapped to this HTML page If the option Analyze statified pages is activated for the deployment system all form inst
58. e only possible via the master Content server changes to the configuration of the WCM system are made only via the master Administration server See also Server category Repository A repository is an abstraction that allows uniform access to data Server category Ina WCM system a distinction is made between master and proxy servers Master servers have write access to the data of the WCM system while proxy servers have only read access The master Content server manages the website data the master Administration server manages the configuration and system data In addition to this any number of proxy servers can be set up Server type According to the tasks of the servers there are two server types Content servers for managing website data and Administration servers for managing the user configuration and system data of the WCM system Basically every Content server is able to provide all views of the data of the managed websites Edit QA and Production The available views may be limited by the fact that the Content server only receives the data of certain views 180 Livelink WCM Server Glossary Session Unit managed by the JSP engine so that logically related actions in terms of resources can be combined Session bean A JavaBean used in a JSP script in connection with the Portal Manager API The life span of a session bean lasts throughout the entire session Statification During statification
59. e template ObjectId topic StringValue topic ObjectId topics RepositoryMap type StringValue type ObjectType url StringValue url StringValue version IntegerValue version Version vip edit url StringValue surrogate_url StringValue Note in repositories of type EDIT Portal Manager API Programmer s Manual 169 Appendix A vip qs url StringValue surrogate url StringValue Note in repositories of type QA website StringValue website StringValue codebase StringValue category StringValue date modified DateValue deployment hint StringValue Note contains file name with extension modified by User released by User 170 Livelink WCM Server Metadata Schemes Portal Manager API Programmer s Manual 171 172 Livelink WCM Server PPENDIX B Caching For operating Livelink WCM Server a relational database management system is required In the database the metadata of the WCM objects are saved among other things This appendix describes the caching behavior of the Portal Manager API with regard to metadata Accessing WCM Objects When an object is accessed for the first time the saved metadata are loaded from the database The object is created from the metadata and then stored temporarily in the server side cache When an object that has already been loaded is requested again the object contained in the cache is returned If an object changes as
60. ects of a website without setting up deployment systems Repositories configured in such a way cannot return deployment specific object data e g URL path 122 Livelink WCM Server Classes and Interfaces of the Portal Manager API The data storage view which is assigned directly to the VipObjectHandlerRepository or indirectly via the deployment system determines which objects are visible The data storage view also specifies which actions can be performed For a detailed descrip tion of which actions can be performed in which view please refer to the description of the ObjectHandler class in the WCM Java API Programmer s Manual The most methods of the VipObjectHandlerBean can only be used if the user is logged in The logged in user must have sufficient rights to carry out the actions Each user who performs actions on the WCM objects uses up one license This license can be used again when the user logs off or the user login becomes invalid in the server Note Every user with write access to the WCM system uses up a license This license is released after one minute even if the user logs out before this minute has elapsed When the minute has elapsed the license will be released together with the user logout The VipObjectFilterBean class Full name de gauss vip portalmanager VipObjectFilterBean The class VipObjectFilterBean makes it possible to filter the WCM objects of a website according to specific crit
61. ects starting from a specific root object can be considered m The maximum number of WCM objects can be specified It is possible to enter a sorting sequence for the retrieved objects Without an explicit entry the WCM objects are sorted by release date The WCM objects with the most recent release dates are at the top of the hitlist 124 Livelink WCM Server Classes and Interfaces of the Portal Manager API The ContentHandler interface Full name de gauss vip portalmanager ContentHandler The ContentHandler interface allows access to the content of an object that is specified by a URL The content can be read as a string stream or reader In all cases a converter can be specified for example XML ContentConverter which converts the content Converters interpret the content and only return the relevant parts Portal Manager API Programmer s Manual 125 126 Livelink WCM Server CHAPTER 5 Notes on Programming with the Portal Manager API This chapter gives you a brief introduction to the programming interfaces of the Portal Manager API It also provides some application examples Authentication and Session Management To be able to use the functionality of the Portal Manager API a proper authentication as a WCM user is necessary due to the system s access and security mechanism The HTTP protocol used for communication between user and the Portal Manager API is stateless This means that authentication is necessary f
62. ed newUserEntry putValue trustedLogin new BooleanValue false no defalt object rights are defined newUserEntry putValue vipRights new StringValue the user is assigned two object classes vip and vipUser RepositoryMap objectclassMap new RepositoryMap objectclassMap putEntry vip null objectclassMap putEntry vipUser null newUserEntry putValue AttributeName OBJECTCLASS objectclassMap assign the user to the website RepositoryMap websiteMap new RepositoryMap websiteMap putEntry VIPSITE null newUserEntry putValue AttributeName WEBSITES websiteMap Portal Manager API Programmer s Manual 141 Chapter 5 assign the user to a group RepositoryMap groupMap new RepositoryMap groupMap putEntry testgroup null newUserEntry putValue AttributeName GROUPS groupMap create the user vub createNewUser 1dap uid newUserEntry gt lt p gt Created new user account lt vub loadEntry 1dap uid gt lt p gt lt else gt lt p gt Please insert data into all fields lt p gt lt gt lt html gt Generating Dynamic Navigation Elements The purpose of consistent navigation in a website is to make the content accessible to the user in an easy way In addition navigation provides the user with hyperlinks for quickly and easily switching to associated content for example to pages on related topics or neighboring pages in the hierar chic
63. eft and in a list in the right window pane Portal Manager API Programmer s Manual 65 Chapter 3 4 Configuration HF Pools 2 Custom connection types a _ Servers E t j Websites Gi Deployment systems 4 Server agents m 1 Utilities Repositories E Applications e E ClickStreamApplication E VipDAVApplication E VipHCLApplication E VIPHTMLClientApplication E VipObjectApplication ES vipUserApplication a EE WebSericeApplication Ee HA FE F 2 Fig 13 Overview of available applications The applications ClickStreamApplication VipDAVApplication VipHCLApplication VIPHTMLC1 ientApplication VipObjectApplication VipUserAppl ication and WebServiceApplication which are displayed here are created during the installation of the WCM system These applications are supplied with the Portal Manager API and should neither be changed nor deleted However you can add and edit any of your own applications The following functions are available for applications m adding an application see the following section configuring applications by means of parameters see section Setting the Parameters of an Application on page 72 m editing application settings see section General Settings of Applica tions on page 81 66 Livelink WCM Server Managing the Portal Manager API m overview of assigned repositories assigning new repositories an
64. ent server Changes to the content and status of WCM objects can only be made on a master Content server The master Content server always has all data storage views Edit QA and Production In addition to the master Content server you can set up proxy Content servers in a WCM system which also provide access by way of deploy ment systems to the website data Unlike a master Content server however proxy Content servers merely have read only access to the content If website data is to be edited using a proxy Content server the proxy Content server consults the master Content server which locks the object from further write accesses and once editing is complete stores the changed objects in the data storage The master Content server then informs all proxy Content servers connected to the website that the WCM object has changed This ensures that your website content remains consistent The deployment systems are responsible for the distribution of the pages in the WCM system The Portal Manager API is available on all Content servers running in the context of a JSP engine or as web application in an application server 26 Livelink WCM Server Concepts Such a Content server is required for using the Content client and the Content client Classic Please note the following for configuring Content servers running in the context of a JSP engine or as web application in an application server Deployment systems of a we
65. entire configuration of your WCM system is performed via the Admin client This is also the central point for administering and config uring the Portal Manager API To open the configuration launch the Admin client and click the Configuration tab The items you can manage in this view are displayed in a tree structure ee Deployment systems r Server agents Utilities SY Repositories don Search servers HAA ple CRCS Fig 7 The Configuration items In this chapter the following configuration items are described Portal Manager API Programmer s Manual 51 Chapter 3 Table 2 Functions for configuring repositories and applications Item Available functions Repositories Adding editing and deleting repositories See section Managing Repositories starting on page 52 Applications Adding editing and deleting applications See section Managing applications starting on page 65 The administration of the other items and the use of the Admin client is described in detail in the Livelink WCM Server Administrator Manual Managing Repositories For general information on repositories refer to section Repositories on page 106 If you open the Repositories item you will see all available repositories both in the tree on the left and in a list in the right window pane 52 Livelink WCM Server Managing the Portal Manager API Configura
66. er Classes and Interfaces of the Portal Manager API A specific implementation of the Value interface must be mentioned in particular the TupelMap class A TupelMap stores pairs of Key and Value Since it is itself of the type Value it can appear as a value in another TupelMap This is how multi level recursive structures are devel oped The following figure demonstrates this construction Key Value key1 value1 key2 value2 values Key Value key1 value1 key2 value2 key3 key3 value3 key4 value4 Key TAIGA key4 value4 keyn valuen Fig 24 Multi level key value lists in the TupelMap It is also possible that a TupelMap contains itself even if this is not really a sensible or desirable constellation In this case some algorithms in the Portal Manager API classes that operate on a TupelMap would assume the state of an endless recursion Portal Manager API Programmer s Manual 99 Chapter 4 Class Diagram The following figure shows the relevant section of the entire class diagram interface interface interface class Serializable Clonable Comparable HashMap interface Value interface Key Fig 25 The basic classes in the entire class diagram Filtering and Sorting Filtering and sorting data are fundamental functions that are frequently required for processing data Filtering Filtering is generally described by the
67. eria All methods inherited from the super class VipObjectBean that return certain object sets are additionally restricted according to the filter conditions defined here Filtering results are stored temporarily in the VipObjectFilterBean in a cache The cache is filled using the method call applyFilter Subsequent filtering with identical filter conditions is not actually performed but is read from the cache The cache can be deleted explicitly method invalidateCache to force a new filtering Portal Manager API Programmer s Manual 123 Chapter 4 The VipWhatsNewBean class Full name de gauss vip portalmanager VipWhatsNewBean The VipWhatsNewBean extends the filter function of the VipObjectFilterBean by the What s New feature What s New returns pages WCM objects that have changed recently or are new The release date is compared to a specific date This date determines how changed recently and new is defined The What s New feature can be extended by the following properties m The retrieved setof changed or new WCM objects can be sorted m Individual WCM objects can be excluded explicitly m Object types can be excluded explicitly m File extensions can be excluded explicitly The following properties are inherited from the super class VipObjectFilterBean m In addition to the What s New condition another filter condition can be entered for restriction purposes m Only WCM obj
68. ervers Parameter E yy Websites F Deployment systems i E Server agents m E Utilities Value true Repositories EH ClickStreamRepository Companyintranet_edit Cancel Help Bh Companyintranet_prod E Companyintranet gs Eh groups Eh LivelinkObjectRepository Eh LivelinkUserRepository Eh LoginRepository EJ Applications ii Parameters Zh roles Eh users Gh VipDAVLockRepository Eh VipHCLConfigRepository Eh VIPHTMLClientConfig A Configuration Name ltrusted login EH EE FE TE E 4 EHH GES Fig 34 Configuring the trusted login mode via the Admin client Portal Manager API Programmer s Manual 129 Chapter 5 Trusted login in the WCM system checkLogin request uid nul1 in the user s settings in the Admin client the option Trusted login must be activated If the user does not log in to the Portal Manager API the user is treated as an anonymous user with minimum rights If the trusted login mode is used for user authentication it is not possible to use the class DirectoryRepository as this repository demands a password that is not available in this case If the WCM system is to be accessed including write access or the requested objects cannot be read by all users the user must log in using the VipUserRepository For this login the use
69. es that describe the status and data of a program Each Application implementation must support at least the following properties m An Application should as far as possible fulfill the factory design pattern each Application class checks which instances exist m An Application can have any number of resources that are used for configuration for example for setting the language The purpose of a resource depends on the concrete Application Resources are entered as strings that describe resource bundle files in the file system or in JAR files identified Livelink WCM Server Classes and Interfaces of the Portal Manager API via the class path Resources are loaded via the standard class loader m An Application uses any number of repositories which differ by name m An Application has a default locale that can be used for local ization and internationalization purposes The listed properties of each Application implementation are real ized as methods in the interface declaration However there are only methods to determine the property values get methods the defini tion of the properties by set methods is not required by an Application Usually the properties are set implicitly by conventions or by properties that are entered at initialization by the open method The ApplicationImpl class Full name de gauss vip portalmanager application ApplicationImpl An ApplicationImp1 is an abstract implementation of the
70. essionApplication class Full name de gauss vip portalmanager application SessionApplication The SessionApplication class represents the abstract basic class for all beans in the Portal Manager API The class provides the following functionality m assignment of the bean to a session m method for retrieving the assigned application m localization information m methods for receiving and setting the repository name The default locale and the resources for the respective application are retrieved from the configuration file application xml The International ization class Full name de gauss vip i18n Internationalization The Internationalization class is responsible for international izing messages Internationalization is controlled by a Locale object Resource bundles are the basis for intemationalization An Internationalization object can use any number of resource bundles onthe basis of any Locale object Access to resources is performed as usual using keys The selection of the Locale objects is controlled by the current Locale ofthe session A key is checked for each resource bundle that is possibly associated with the Locale until one of the resource bundles returns a value If resource bundles have the same key the resource bundle which is entered first in the file application xml is used 116 Livelink WCM Server Classes and Interfaces of the Portal Manager API The Internationalization class makes methods available for
71. g carts Personalization and navigation should always go hand in hand Naviga tion should not display content that the user does not want to see or is not supposed to see Integrating External Programs Website applications are always dynamic components When integrating an application in a website it is important to adapt the user interface to the website with regard to data and the look and feel Ideally program data is interpreted as content or as elements of content so that the source of the content no longer plays a role when the website is displayed How to perform this task strongly depends on which interfaces the program offers The Portal Manager API gives you programming support and makes such an integration possible on the functional and data levels Placing Several Content Objects on one Page Multi Content Page Using the Portal Manager API any number of content objects can be presented on a page Of course limiting aspects as mentioned under the keyword personalization must be taken into account The content can consist of objects from WCM managed websites or data from programs Even inter website and inter program content links are no problem at all Portal Manager API Programmer s Manual 35 Chapter 2 Forms Thanks to the options provided by the Portal Manager API you can easily develop form based solutions You can use form based interfaces for example to create and edit the objects of a webs
72. g of the option User defined installation in the WCM installation program see Livelink WCM Server Installation Manual In order to create a website in this scenario start the new website wizard in the Admin client and create the website with the option User defined 30 Livelink WCM Server Concepts Starting a Content Server in the Application Server Both the Content client and the Content client Classic use the Portal Manager API For making this API available also for custom JSP pages a Content server must be started in the context of the application server Content server as web application If a web application has been generated for the Content server the Content server runs in an application server If the application server used supports the servlet standard 2 3 the Content server is started and stopped automatically together with the respective web application If the application server supports the servlet standard 2 2 the web appli cation and the Content server are started and stopped separately In this case use the respective scripts for the Content server see the following section Make sure that the web application is started first Starting the Content server in the JSP engine If the Content server runs in the context of a JSP engine that does not support web applications the scripts located in the directory WCM installation directory tools must be used for starting the server The following ste
73. g these interfaces The internal structure of the Portal Manager API can be described by a simple layer model see the following figure Portal Manager API Programmer s Manual 19 Chapter 2 JSP Script a lt i oO D E E Commerce S sket 5 Application T E RDBMS server LDAP server Content Manager Fig 1 The layer model of the Portal Manager API JSP Scripts JSP scripts are Java code embedded in HTML pages Requests from clients HTML browsers to the web server result in the JSP engine executing the Java code in such HTML pages The result is returned to the client as content The Java code is thus executed on the server side The Java code is converted into servlets by the JSP engine once before the initial execution This is invisible to the client because the client only sees HTML pages Java code used in JSP pages must be enclosed in tags that correspond to the JSP syntax Otherwise the code cannot be processed by the JSP engine 20 Livelink WCM Server Concepts Session Beans Beans are classes whose instances can be used in JSP scripts They are the starting point in the Portal Manager API A bean is based on an appli cation depending on which tasks are supposed to be performed with the Portal Manager API As with applications external programs cannot be connected until individual bean classes have been developed Each of the beans contained in the Portal Ma
74. ge for example English After selecting the language a JSP page is called up which will set all the necessary OIDs such as the start files of the individual areas Once an area has been selected the template will receive the OID from the session and will display the applicable objects 164 Livelink WCM Server Notes on Programming with the Portal Manager API Applications and Internationalization The Portal Manager API offers the possibility of integrating user specific applications in the API For being able to use the internationalization support of the Portal Manager API you must perform the following steps 1 Localize all resources in accordance with the standards laid down in Java 2 PropertyResourceBundle etc 2 Assign the resources and the parameters to the user specific appli cation see section Managing applications starting on page 65 WCM Beans and Internationalization All WCM beans have integrated support for internationalization Its use is made possible by the following methods m The current setting of the Locale valid for a specific bean is provided by public java util Locale getLocale m The Locale fora specific bean can be set by public void setLocale java util Locale locale WCM Internationalization Object To support internationalization Livelink WCM Server provides a specific internationalization object that is used in the WCM beans Access to this object is ensured by means of the method get1
75. ges The password of the user entered under principal changes Portal Manager API Programmer s Manual 57 Chapter 3 Repository Parameter credentials read Description The password of the user entered under principal read dn pattern The pattern for the structure of the distinguished name dn is replaced by the key value Example uid ou software o company example becomes uid smith ou software o company example if the current key value is smith group base The start node below which the entries for the user s groups are searched If the attribute has not been set the value of base is used for this attribute mappings The mapping between the LDAP parameters and the WCM parameters Possible mappings are for example name and language These have the attributes 1dapatttr and pomaattr The attribute pomaattr must not be changed see figure 22 The DirectoryRepository with its parameters on page 89 member key attrib The name of the LDAP attribute under which the users of a group or role are stored objectclass The name of the object class that should be inserted when creating a new entry provided that no object class has been specified example vipUser The entries are separated by spaces password attrib principal The name of the LDAP attribute to be used as the password in Livelink WCM Server An LDAP user with the right
76. ges As scope for the beans a session scope should be set Beans use an application which represents the actual program For this reason the highest level bean class is called SessionApplication Note All beans of the Portal Manager API were developed for use with session scope When using other scopes especially request and page there is the danger of using up many CA licenses CA concurrent author which can only be used again after the respective context IDs in Livelink WCM Server have become invalid Beans contain high level methods based on the Application and Repository classes These methods summarize typical use cases of a program in an easy to understand and efficient manner 114 Livelink WCM Server Classes and Interfaces of the Portal Manager API The abstract implementation in SessionApplication provides in partic ular simple facilities for internationalizing programs In this way users are offered a program with country specific standards and language This is only possible if localization information on the respective user is available Class diagram The following figure shows the relevant section of the entire class diagram bstiact ch interface TER ae Bi CRAS Http Session ae ase BindingL istener A N interface uses ContentHandler A Fig 32 The bean classes in the entire class diagram Portal Manager API Programmer s Manual 115 Chapter 4 The S
77. gives you an overview of the parameters expected by the repositories supplied with the Portal Manager API 56 Livelink WCM Server Managing the Portal Manager API Table 3 Repositories and their parameters Milliseconds Repository Parameter Description VipHclConfigRepository ProfileDataRefresh The time in milliseconds that an unchanged profile is maintained in the Content client until it is reloaded from the Administration server SaveWaitMilli The interval in milliseconds for saving changes to seconds the profile data DirectoryRepository authentication The authentication method The values SIMPLE no encryption and NONE are possible NONE should not be used because in this case no authorization is performed and no data can be read or written base The start node under which the entries are searched or entered Example ou software o company example build profile_ filter_expr The search expression that is used when searching for groups and roles The expression DN is replaced by the distinguished name The expres sion UID is replaced by the user ID or if no user ID has been supplied to the method by the distin guished name context factory The Initial Context Factory for the LDAP classes Currently only the class com sun jndi ldap LdapCtxFactory is supported credentials The password of the user entered under principal credentials chan
78. h the Portal Manager API Livelink WCM Server offers two possible ways of implementing the controller in the JSP model 2 architecture First you can use the JSP page or the servlet as a controller Since JSP pages are easier to handle in Livelink WCM Server than servlets we recommend using JSP pages You can also work with WCM templates that may contain the following functionality m Login check to see whether the session user has already logged in to the Portal Manager API Creating and initializing Portal Manager API beans that are needed in the view Forwarding the request to a JSP page depending on the request parameters m Error handling by means of a try catch block lt try gt VIPCONTENT lt catch Exception ex Error handling gt Error lt ex getMessage gt lt gt Although the generated page contains the template and the content of the view as in JSP model 1 the web designers cannot see the content of the template The templates should therefore be written by experienced Java developers 158 Livelink WCM Server Notes on Programming with the Portal Manager API The web designers are responsible for writing the view of the WCM object When they create a WCM object they can select a template that may subsequently be modified The web designers should use as little Java as possible in the JSP page lfweb designers cannot avoid using Java e g because of logical or arith
79. he underlying external data source The Repository interface is implemented by the abstract basic class RepositoryImp1 This class is the basis for all Repository implementa tions supplied with the Portal Manager API The RepositoryImp1 class Full name de gauss vip portalmanager repository RepositoryImpl This Repository implementation is the abstract basic implementation of a repository for all repository classes supplied with Livelink WCM Server A login repository is modeled as a LoginRepository interface It extends the Repository interface by methods for checking the login Sessions For each access to repository contents a session must be indicated The information contained in the session can be used by the repository A session describes the current processing context between the browser and web server In addition the session contains an ID With this ID the name of the user who is logged in to this session is available This user name should be used to guery account information from a login repository The interface Session is represented in connection with the session related classes see figure 32 The bean classes in the entire class diagram on page 115 108 Livelink WCM Server Classes and Interfaces of the Portal Manager API Class Diagram The following figure shows the relevant section of the entire class diagram abstract class Base interface Repository interface Login Reposito
80. he session Only getting the profile at login and creating new entries is performed in the context of principal Like any other repository the DirectoryRepository must be configured using the Admin client 88 Livelink WCM Server Managing the Portal Manager API DirectoryRepository Ei Applications H Parameters authentication base build profile filter expr context factory credential changes credentials credentials read dn pattern group base E mappings E mapping E language Idapattr pomaattr E name Idapattr pomaattr member key attrib objectclass password attrib principal principal changes principal read role base search scope url m Fig 22 The DirectoryReposi tory with its parameters Locating Errors Locating errors within the methods and classes that derive directly or indi rectly from the Base class is called tracing The tracing behavior can be configured in the trace properties file For the changes made in the file to take effect the servers must be restarted You can also configure the tracing behavior in the Admin client In this case it is not necessary to restart the servers The file trace properties contains the following entries Portal Manager API Programmer s Manual 89 Chapter 3 Entries in the trace properties file Entry Meaning output policy This entry is used to determine the output type The following values are possible Stdout default
81. heme for class diagrams 96 Livelink WCM Server Classes and Interfaces of the Portal Manager API Class Description During installation of the WCM system the complete class documentation of the Portal Manager API is installed as Javadoc pages The Javadoc documentation is located in the directory WCM installation directory documentation javadoc The class descriptions in this manual differ from the Javadoc documentation The Javadoc on the Portal Manager API offers detailed information on all the classes and interfaces and their associated methods Basic Classes All classes supplied with the Portal Manager API use a number of basic classes which can be categorized in four groups m basic data types m filtering and sorting m RepositoryMap and associated classes m repositories These four groups are described in this section For each group the respective section of the class diagram is shown The basic classes supply the important algorithmic and data related foun dations of the Portal Manager API including important properties such as comparability filter capability and sort capability The highest level of abstraction is attained by the repositories Since all basic classes are used directly or indirectly in session beans knowledge of these classes and the related concepts is essential Portal Manager API Programmer s Manual 97 Chapter 4 Basic Data Types All attribute keys of a WCM object implement the
82. ilers JSP script HTML page in which Java code has been embedded which is run on the server side LoginRepository Repository used to work with user accounts Master server Only master servers have read and write access to the data of a WCM system The master Content server manages website data while the master Administration server manages the configuration and system data of the WCM system See also Server category ObjectHandler This instance accepts actions and thus manipulates the objects of the website Personalization Dynamization of the website tailored to the current user Portal Manager API Programmer s Manual 179 Glossary Portal A portal is a website that serves the user as a central point of access as a gate to certain Internet services A portal often offers topic specific and personalized offers and information Properties file A file containing resource information in a defined format key value pairs Proxy server A proxy server is used to intercept requests from a client application e g a browser to one or more other servers If the proxy server can meet the request it sends the requested data back to the client Otherwise it forwards the request to the specified server In the context of Livelink WCM Server WCM servers of the category proxy do not have write access but only read access to the WCM objects or the configuration Changes to the WCM objects ar
83. in section Generating Dynamic Navigation Elements starting on page 142 Class Diagram The following figure shows the relevant section of the entire class diagram Portal Manager API Programmer s Manual 101 Chapter 4 interface Serializable interface interface Filter Sort Fig 26 The filtering and sorting classes in the entire class diagram RepositoryMap and associated classes The RepositoryMap class is among the most universal of the basic data types in the Portal Manager API The classes belonging to RepositoryMap must not be confused with the classes that implement the Repository interface Even though they are closely linked thematically there is no data inheritance relationship between them Class Diagram The following figure shows the relevant section of the entire class diagram class TupelMap class dass RepositoryEntry RepositoryMap interface Repository 1 Iterator supplies interface RepositoryEntry lt Iterator supplies Fig 27 The RepositoryMap class in the entire class diagram 102 Livelink WCM Server Classes and Interfaces of the Portal Manager API The following figure shows the classes that are used in the Portal Manager API to store data The diagram does not emphasize the data attribute hierarchy but the structural relationships torage key i dass uses SST ioner Object dass fr HashMap
84. ings on the Basic data tab are made when the applica tion is added You can change all settings except the name subsequently m On the Resources tab you can change the settings for the access to Java resources 3 Make the desired changes 4 Click the Apply button Assigning a Repository to an Application Select Configuration Applications application name gt Repositories to display an overview of the repositories that have already been assigned to the application The assigned repositories are displayed in a list in the right window pane Portal Manager API Programmer s Manual 81 Chapter 3 4 Configuration Pools 2 Custom connection types G Servers E t j Websites Tea Deployment systems Server agents TB Utilities Repositories JE Applications E ClickstreamApplication Repositories H Parameters Name v ClickStreamRepository F ae ee 0 Fig 19 Repositories assigned to an application Assigning a repository to an application How to assign a repository to an application 1 Select Configuration Applications application name gt Repositories 2 Choose Assign repository on the context menu or click the corre sponding icon Eh Icon for assigning a repository to an application The Select repository dialog box opens It shows a list of the reposi tories not yet assigned 3 Mark the desired repository 4 Click the OK
85. ion modes Authentication via HTTP request parameters The WCM user parameters are defined using the HTTP request parameters userName and userPassword inthe HTTP request of the JSP engine In this mode the authentication parameters are made available by using an HTML form that supplies the required parameters Authentication via HTTP standard authentication The WCM user parameters are provided via the authentication mechanism of the web server The Authorization field in the header of the HTTP request contains the user name and the password which are separated by a colon and Base 64 coded 128 Livelink WCM Server Notes on Programming with the Portal Manager API Context ID login from request or cookie The context ID is read and the user is logged in This ID is assigned by Secure Access or written to the request during statification Trusted login authentication via the session attribute For enabling the Portal Manager API to work with other e business applications and to support single sign on it is possible to request the WCM user s name from an attribute that is associated with the HTTP session The trusted login mode is a function of the LoginRepository interface The following figure shows how to configure trusted login in the Admin client Livelink WCM Server Administration Admin Configuration Program View Tools Help ESLT Apaia rev node x Pools E Custom connection types Node EF A S
86. ion server start 31 ContentHandler interface 125 Portal Manager API Programmer s Manual 183 Index D data values 98 delete application 84 repository 65 DirectoryRepository class 87 dynamic content 33 dynamic navigation elements 142 E errors locate 89 F filtering 100 FormData class 37 forms creating an object 37 working with 36 framework applications 152 G generate static special attribute 39 H HTML form 149 implement applications 153 integrating external programs 35 integration external programs 46 in the WCM system 24 Interfaces VipProfile 117 184 interfaces Application 112 ContentHandler 125 RepositoryEntrylterator 104 Repositorylterator 105 Value 98 internationalization 160 architecture of the Portal Manager API 161 Portal Manager API solution 162 WCM internationalization object 165 Internationalization class 116 J Javadoc 97 JavaServer page lt ltalic gt see JSP page JSP page design 157 model 1 architecture 157 model 2 architecture 157 JSP script 20 JVM with SecurityManager 160 without SecurityManager 159 K key values keys 98 L language application 69 LDAP create new users 133 DirectoryRepository class 87 life cycle of a WCM object 45 locale 160 login repositories 107 Livelink WCM Server M manage applications 65 repositories 52 metadata schemes 167 multi content page 146 N navigation elements 34 new application 67
87. ion to program elements etc Element Program interface such as menu commands windows dialog boxes field and button names Font or symbol Menu Entry Examples File Create Paths to directories file and directory names Quotations from program code or configuration files Drive Directory File name Code quotations D WCM admin bat lt head gt lt title gt heading lt title gt lt head gt Variables i e placeholders for specific elements variable WCM installation directory Important information and warnings are enclosed in gray boxes Make sure to read such information to avoid losing data or making errors when using and managing WCM systems 16 Livelink WCM Server Portal Manager API Programmer s Manual Introduction 17 18 Livelink WCM Server CHAPTER 2 Concepts This chapter describes how the Portal Manager API is integrated in a WCM system Moreover the general concepts of programming with the Portal Manager API are explained The Architecture of the Portal Manager API The functionality of the Portal Manager API is a result of the collaboration of the various components of the WCM system The most important are m servers e g master Admin server master Content server proxy Content server m websites managed in the WCM system m session beans and other classes of the Portal Manager API m JSP pages usin
88. ite managed with Livelink WCM Server A form is a JSP page that provides a form based interface to the user This type of form is used to retrieve and process data for a form instance The possibilities of form based work are represented by two special object types Form template and Form instance Form template template defining the type Form m Form instance content of a form form template as XML data In order to offer a form based interface on the basis of these object types the actual forms must be developed as JSP pages with the corresponding selection and entry options Basically the form template serves only to identify and typify the different form instances The form instance a filled out form is an XML file that can have a specific form template as its WCM template Note For editing XML data structures the four object types XML docu ment XML template XSLT document and XSLT template are available For detailed information on these object types refer to the Content Client User Manual Processing Form Data In a form instance the data of the individual form fields is stored in an XML notation To generate these XML data from an HTML form the methods of the FormData class are used 36 Livelink WCM Server Concepts The FormData class Full name de gauss vip portalmanager util forms FormData The FormData class provides methods for processing form data in pa
89. ivelink WCM Server accesses the LDAP directory service It is possible to add further object classes and attributes in the LDAP directory service When adding an entry to LDAP these object classes can be specified They must be entered as Value in the RepositoryEntry under the key AttributeName OBJECTCLASS asa RepositoryMap Portal Manager API Programmer s Manual 87 Chapter 3 The identifiers for the attribute types in the LDAP directory service differ from those used internally in the Administration server The AttributeName class contains constants for the valid attribute names and methods that help to map the internal attribute identifiers to the LDAP directory service spelling The mapping of identifiers is only necessary for individual implementa tions of a repository class that accesses the LDAP directory service The internal attribute identifiers are automatically transformed into the identi fiers for the LDAP directory service when the DirectoryRepository class writes data When reading from the LDAP directory service this process is automatically performed in the opposite direction Note Microsoft Active Directory does not support overwriting an entry Thus when using Microsoft Active Directory the putEntry method results in an exception if the entry already exists in the LDAP directory service Itis however possible to create a new entry All method calls take place in the context of the user currently logged in to t
90. l Manager API Designing a JSP Page Various models are available to you for designing a JavaServer page JSP page In the JSP model 1 architecture the JSP page is responsible for processing a request and sending a reply to the client Access to the data is performed by the JavaBeans This model results in a large number of scriptlets and or large amounts of Java code in the JSP page This makes it more difficult to maintain these sources eliminate errors in them or reuse them Moreover there is no clear separation of logic and presenta tion which makes it difficult to split jobs between Java developers and web designers The JSP model 2 uses the MVC model design Model View Controller Here a controller JSP page or a servlet is used that is responsible for processing the request and generating the beans The JavaBeans Portal Manager API classes are the model that has access to the data sources The controller decides depending on the request parameters which JSP page to forward the request to The View JSP page has no processing logic It uses the beans to build up the dynamic content Application server Request Gontroller Servlet M Enterprise server A Lt Data sources 72 instantiates e a jag m r A View i USD Response JSP E Fig 40 JSP model 2 architecture Portal Manager API Programmer s Manual 157 Chapter 5 Tips for Developing JSP Pages wit
91. l Manager API to create dynamic and personal ized websites you must first understand its basic programming concepts The purpose of this section is to introduce you to these basic concepts The Portal Manager API enables you to develop programs for the JSP engine so called JSP scripts JSP scripts implement the part of a website or portal that the user sees similar to the role of the GUI in a conventional application Furthermore the Portal Manager API provides extensive support when integrating new solutions 32 Livelink WCM Server Concepts Interfaces in the form of completed Java classes are provided for creating JSP scripts as well as applications The Java classes and JavaBeans implement the concepts introduced in this chapter Chapter 4 Classes and Interfaces of the Portal Manager API gives you an overview of the classes and beans For more detailed information please refer to the Javadoc on the Portal Manager API Dynamic Content The Portal Manager API can be used to create and manage dynamic web content which is characteristic of corporate portals In contrast to the static content that the writer or editor specifies when a page is created dynamic content is generated entirely or in part at runtime Dynamic content thus allows you to react to the current situation and the current context while the website is being used The template concept already implemented in Livelink WCM Server is basically a step in the direction
92. l in the Java 2 specification As a web application the Portal Manager API uses other software compo nents in addition to the Java programming language The architecture and the implications of the architecture for internationalization are explained in the following sections Architecture of the Portal Manager API and Internationalization The following diagram illustrates the architecture of the Portal Manager API with all aspects relevant to internationalization Language s pe cific version HTML page Browser language Locale of JVM setting HTTP GET lt Accept Language gt Browser Web server lt localized page gt JSP Engine Locale setting in line with Beans WCM language setting in application xml Fig 41 Architecture of the Portal Manager API with internationalization aspects Portal Manager API Programmer s Manual 161 Chapter 5 The architecture is based on the following components m a browser as client for the HTTP protocol m aweb server as server for the HTTP protocol m a JSP engine as adapter between web server and Java applications m components of the Portal Manager API e g JavaBeans that are executed in a JSP engine As shown in the diagram each of these components has its own settings relevant to language and internationalization m The browser can request a specific language via the HTTP header m The web server has to keep different document
93. lass describes the basic functions and behavior of the program On this level however no functions should be combined to form function units You can create a new application class very quickly if you derive it from the abstract basic implementation ApplicationImp1 supplied One or more repositories are an essential component of every appli cation For most programs you do not have to develop additional functions because the repository already sufficiently describes the program For example the applications that implement the various aspects of Livelink WCM Server do not have methods apart from those of the abstract basic implementation for applications m Ifnecessary each application is encapsulated by one or more beans You must also develop this bean Here too it is recommended to use a given abstract basic implementation as a starting point Portal Manager API Programmer s Manual 47 Chapter 2 The bean carries out two tasks First it creates the more or less formal interface to the JSP script and to the JSP engine s session handling The basic implementation of the bean performs this task The second more demanding function of the beans is to make avail able simple but powerful access methods at the highest possible abstraction level for an application and its repositories The bean combines the basic functionality made available by an application with the access possibilities of the repositories thus creating consis
94. le etc that can be read and output in HTML It is also possible to obtain the URL of an object via the RepositoryEntry though it is only possible to specify the URL from the applicable deployment system However it makes sense to show the hyperlinks for the system in which the user is already located A suitable method is provided by the class VipObjectBean Implementation The following section outlines how to build the JSP page 1 Import the required classes Instantiate beans with a special JSP statement 2 Make sure that all WCM beans used are initialized It must be known to the VipObjectBean class which repository is to be used The repository specifies the deployment system The WCM tag VIPDEPLOYMENT_NAME which references the deployment system of the object is usually used for the repository The WCM tag VIPOID however references the OID of the WCM object The following example contains the JSP code used to read and run through the RepositoryIterator applicable to all JSP topics below the WCM OID The commands are coded in HTML code in such a way that for example an entry in a list or a row in a table is output for each RepositoryEntry A hyperlink can then be constructed from the name of the entry and the URL of the WCM object 144 Livelink WCM Server Notes on Programming with the Portal Manager API lt html gt lt head gt lt TITLE gt getSubElements lt TITLE gt lt head gt lt body gt l
95. ll session information in the Portal Manager API m VipProfile contains all information about the WCM user associ ated with an HTTP session Login Repositories The following diagram shows the repositories that can be used for a login interface LoginRepository from repository Fig 36 Login Repositories Sometimes it is necessary to write your own login repositories For example if you have a database with all the user information and want to use the data source for authentication purposes you must develop a login repository that accesses the database This class must implement the LoginRepository interface and must be derived from the abstract basic class RepositoryImp1 or from one of its subclasses For further informa tion see section Deriving from the RepositoryImp1 class on page 154 The default login repository is the users repository 132 Livelink WCM Server Notes on Programming with the Portal Manager API Application Examples for the Portal Manager API This section contains application examples of programming with the Portal Manager API for the following topics m creating users via a portal see the following section m creating dynamic navigation elements see section Generating Dynamic Navigation Elements on page 142 m multi content pages see section Placing Several Content Objects on one Page Multi Content Page on page 146 form based creation of objects see section
96. maximum number of objects to be displayed in the hitlist of the Content client Classic after applying the object filter Default value 1000 MAX SHOWN LOG ENTRIES Specifies the maximum number of entries to be displayed in the log of the Content client Classic Default value 100 MAX SHOWN PRINCIPALS Specifies the maximum number of entries to be displayed in the selection lists for adding principals to an access control list see dialog box for changing the access control list Default value 300 78 Livelink WCM Server Managing the Portal Manager API Application Parameter MAX SHOWN REFERENCES Description Specifies the maximum number of entries to be displayed in the lists in the References dialog box of the Content client Classic Default value 300 MAX SHOWN TEMPLATES Specifies the maximum number of entries to be displayed in the selection list Template of the Content client Classic see Metadata dialog box and dialog box for adding an object Default value 300 MAX SHOWN VERSIONS Specifies the maximum number of versions to be displayed in the Restore old version dialog box of the Content client Classic The most current object versions are displayed Default value 300 OPTION SHOW DEBUG INFO If the value of this parameter is true additional information is displayed in some dialog boxes of the Content client Classic This information ca
97. mporarily generated dynamic page This value can be over written by means of the special attribute timeout in the metadata dialog of the Content client Portal Manager API Programmer s Manual 39 Chapter 2 The timeout value that applies to a page is determined as follows 1 The value of the special attribute timeout is determined for the object to be statified 2 The value of the special attribute timeout is determined for the template assigned to the object to be statified if necessary the template cascade is searched 3 The timeout value is read from the configuration of the deploy ment system Thus the timeout value specified in the Admin client is only used if neither the object to be statified nor one of its templates has a valid value for the special attribute timeout Note The statification is performed by means of the Content snarl running in the context of the JSP engine or as web application in the application server Especially if this Content server is over loaded the valid timeout value may be exceeded This results in the abortion of the statification attempt and in error messages Accord ingly select generous timeout values m absolute urls The special attribute absolute urls plays among other things a special role when statifying form instances see section Statification of form instances on page 41 Object Dependent Statification An object whose type is assig
98. n be used for locating errors Default value false none VipObjectApplication none extend profile VipUserApplication A list of repositories separated by spaces These repositories are used for the extension of the profile Portal Manager API Programmer s Manual 79 Chapter 3 WebServiceApplication allowedWebsites A comma separated list of website names The specified websites can be accessed via WCM WebServices Entering an asterisk allows access to all WCM managed websites Default value empty access via WCM WebServices not possible deniedWebsites A comma separated list of website names The specified websites cannot be accessed via WCM WebServices Entering an asterisk blocks access to all WCM managed websites A prohibition takes priority over a permission Default value empty Deleting an application parameter In order to remove a parameter from the configuration of an application mark the desired parameter in the right window pane Choose Delete parameter on the context menu or click the corresponding icon af Icon for deleting a parameter eC 80 Livelink WCM Server Managing the Portal Manager API General Settings of Applications To edit the settings of an application 1 Select Configuration Applications 2 Mark the desired application in the tree on the left In the right window pane the settings are displayed on two tabs m The sett
99. n supported methods should throw a meaningful exception Portal Manager API Programmer s Manual 155 Chapter 5 Deriving from the ApplicationImpl class The ApplicationImpl class and the classes derived from it have the following functions m Managing all repositories associated with an application Providing the business logic for an application All methods required to support the Portal Manager API are provided via the basic class ApplicationImp1 and do not have to be implemented by means of a derived Application class Applications are configured via the Admin client There are no general rules for implementing the busi ness logic for a specific application Deriving from the SessionApplication class The SessionApplication class and the classes derived from it have the following functions Encapsulating an Application as a JavaBean to support the JSP application Associating an Application with a specific HTTP session and the HTTP session with a WCM user m Maintaining a runtime locale for the Application m Returning messages and resources in accordance with the current locale setting This is done via the intemationalization object that is associated with the SessionApplication All methods required to support the Portal Manager API are provided by the basic class SessionApplication and do not have to be implemented by the derived bean classes 156 Livelink WCM Server Notes on Programming with the Porta
100. nager API is linked to a JSP session That is why they are also called session beans Sessions are units managed by the JSP engine The purpose of a session is to be able to combine the actions of a web client This is not possible with HTTP as the protocol between web client HTML browser and web server because HTTP is a stateless protocol But a session exists beyond individual HTML requests A JSP script can reference the current session This means that a state for each user can be managed despite numerous requests Session beans facilitate resource management considerably A session begins with the first contact of a web client and ends with the last contact The JSP engine is technically responsible for managing the session Generally the JSP engine saves a session key in the respective browser This means that the browser must allow non persistent cookies Each JSP engine has its own strategies to determine when and how the session key becomes invalid or when the last contact with a browser took place Normally this is determined empirically through time behavior Different browser instances on the same client computer are normally associated with different session keys The entire JSP engine complex is almost completely standardized Portal Manager API Programmer s Manual 21 Chapter 2 Applications Applications are descriptions of any programs that are to be referenced in the Portal Manager API The Portal Manager API alrea
101. nagerClassDiagram pdf The diagrams in the text each represent the relevant sections In the entire diagram the classes belonging to one topic are each marked in a specific color For the class diagrams the following scheme derived from UML diagrams is used m White boxes indicate classes or interfaces that belong to other sections for example to other related topics of the Portal Manager API or to the Java basic libraries Java Foundation classes or Java extensions These classes are not explained in the text They are included in the diagram as contextual references Portal Manager API Programmer s Manual 95 Chapter 4 m Light boxes symbolize interfaces The interface name is always written in italics m Dark boxes represent classes Only the names of abstract classes are written in italics The relations of the classes and interfaces are described by arrows A filled arrow represents the inheritance of a class keyword extends an empty arrow represents the implementation of an interface keyword implements Dashed arrows represent associative relations between classes In this case the relationship is explicitly stated The following figure illustrates the conventions used in this scheme interface External Interface class External Class interface Interface1 abstract class AbstractClass1 interface Interface2 uses class Class1 Fig 23 Representation sc
102. ned to the attribute set dynamic possesses the special attribute generate static You can use this attribute to determine in the Metadata dialog of the Content client how the code of the object and if existing of its template s is to be statified This requires that object dependent statification is set for the deployment system in the Admin client 40 Livelink WCM Server Concepts Statification of JSP objects Statification of JSP objects is object dependent if the special attribute generate static has the value on or local m on This value causes the content of the object to be converted into static code The same applies to all templates assigned to the object provided their content is inserted into the page which the deployment system generates for the object m local Regarding the body element this value has the effect that only the content of the object is converted into static code Addition ally the content of the entire head element which may consist of the merged content of the head elements of the template cascade is converted into static code Variables defined in a JSP template can only be used by objects that have the same statification status as the JSP template For the object to be able to use the variable from the JSP template the following conditions must be met in the case of a not completely statified template cascade m either the code of both the JSP template and the object must b
103. ntries will appear below the respective node in the illustration the parameters max records store table and tosg1 have been assigned to the ClickStreamRepository 4 Configuration li Pools ld Custom connection types _ Servers m Websites a Deployment systems ss Server agents utilities Repositories Ej ClickStreamRepository F Applications Hi Parameters max records store table tosql Sh groups Sh InternetSite_edit InternetSite_prod InternetSite_qs Sh roles users Sh VipDAVLockRepository En VipHCLConfigRepository Sh VIPHTMLClientConfig EH EH 1 4 E T HHHH HH EHE Fig 12 Structure below the tree item Repositories 64 Livelink WCM Server Managing the Portal Manager API Deleting a Repository To delete a repository 1 2 3 Select Configuration Repositories Mark the desired repository in the tree on the left Choose Delete repository on the context menu or click the corre sponding icon an Icon for deleting a repository Confirm the security prompt by clicking the Yes button The configuration of the repository is deleted from the WCM system the associated Java class is however not deleted Managing applications For general information on applications see section Applications on page 111 If you open the Applications item you will see all available applications both in the tree on the l
104. nual for more information on the staging For further information on the VipObjectHandlerBean see section The VipObj ectHandlerBean class on page 121 The Javadoc on the Portal Manager API provides a detailed description of the methods of this class Integrating External Programs The Portal Manager API is basically a framework that allows the integra tion of external programs such as e commerce applications In this context subjects such as dynamic content personalization and correla tion with website content play an important role Integrating an external program is relatively easy and very well prepared for in the Portal Manager API If you want to implement external programs within the given framework you should observe several design principles The easiest way to implement external applications is to use a bottom up strategy 46 Livelink WCM Server Concepts m In most cases an external program functions exclusively as data source and data target For this purpose itis necessary to implement appropriate repositories or use already existing repository implemen tations Repositories are important generally the most important or sometimes even the only components of an application New repositories can be implemented by extending existing reposito ries or by developing them on the basis of the abstract basic repository RepositoryImp1 m For each new program it is necessary to develop an application class This c
105. o address the application If for example two Content servers are to possess differently configured VipUserApplications two VipUserApplications can be created with different names that both have the logical name VipUserApplication Livelink WCM Server Managing the Portal Manager API m Language default language of the application The language is used among other things to read localized resources An entry of type language code country code e g en_US is expected For more information refer to the Java SDK API documentation of the java util Locale class Confirm your entries by clicking the Next button Quit Wizard new application xl Quit wizard The information given so far is sufficient to create the lt j application You can now close the wizard or make K Py extended settings A Quit wizard and create application 8 Continue wizard with extended settings Help Cancel Back Fig 15 Quit wizard The information that you have specified so far is sufficient for adding the application You can however optionally assign repositories and resources to the application Click the desired radio button and confirm by clicking the Finish or Next button Portal Manager API Programmer s Manual 69 Chapter 3 Assigning Repositories In this dialog box you can assign repositories to the application already during the setup El New application xi Reposito
106. of dynamic content because content is created by connecting two or more content objects The result however is static and cannot adjust in real time to the context in which the website is used In a really dynamic website the content can be checked or updated at runtime when a page is requested by a user Its power and flexibility can be seen from the look at the typical requirements of modern websites which are introduced below on the basis of a selection of typical applica tion cases of the Portal Manager API These scenarios serve as examples only the use of the Portal Manager API is in no way limited to these examples Portal Manager API Programmer s Manual 33 Chapter 2 Navigation Elements First of all navigation is defined as the possibility to display the context of the current page so that the user is able to understand the context quickly In addition navigation provides the user with hyperlinks for quickly and easily switching to associated content for example to pages on related topics or neighboring pages in the hierarchic structure Sitemaps also belong to the navigation elements although they generally represent information concerning the entire website and not the context of the current page Navigation elements can appear on a page in many ways Animated components that display navigation elements as menus or as a expand able tree structure are possible Navigation elements can be designed with the
107. ogrammer s Manual 59 Chapter 3 authentication The authentication method Possible values are LOGIN SESSION and CONFIG LOGIN For the DoorwaysBean class an explicit login must be made using the DoorwaysBean setLogin method SESSION The login information from the SessionBean class will be used CONFIG All users are logged in with the user infor mation of a default user The user information is specified by means of the user and pwd parameters hostname The host name of the Doorways server to which a connection is to be established port The port of the Doorway server for the connection pwd The password of the default user entered under user user The default user whose user account is used for the CONFIG authentication method 60 Livelink WCM Server Managing the Portal Manager API Repository Parameter Description VipObjectHandlerRepository for deployment systems deployment name The name of the deployment system e g website name edit whose objects are accessed via the repository Notes Alternately you can also use the viewand website parameters to configure the repository In this way you can access the website objects without having to set up deployment systems Repositories config ured in this way cannot return deployment specific object data such as an URL or path The deployment name parameter takes priority over the view and website parameters That means
108. oid title subtitle description target group keywords 74 Livelink WCM Server Managing the Portal Manager API Application Parameter Description VipHCLApplication default profile user Specifies the ID ofthe WCM user whose default profile is to be used as the template for the default profile of new users Default value empty i e there is no template for default profiles embedded type names hcl absolute servlet hcl root Contains a comma separated list of object types When a WCM object is added objects of this type are regarded as embedded objects If this parameter is not set the following list is used as the default value ETC GIF JAVASCRIPT JPG PNG Specifies the absolute URL for addressing the controller servlet of the Content client The controller servlet is responsible for controlling the Content client Example http wcmserver company example hclservlet Specifies the absolute URL for addressing the start page ofthe Content client Example http wcmserver company example cmsclient Portal Manager API Programmer s Manual 75 Chapter 3 Application Parameter hcl servlet url Description Specifies the name for addressing the controller servlet of the Content client The controller servlet is responsible for controlling the Content client Default value hclservlet name of an InSite Editing deployment s
109. or as individual parameters Nodes group parameters of the same type Nodes may contain other nodes Unlike parameters they do not have a value To define parameters for a repository 1 Select Configuration Repositories repository name gt Parameters 2 Choose New parameter on the context menu or click the corre sponding icon Fal Icon for adding a parameter aC The New node dialog box opens Portal Manager API Programmer s Manual 55 Chapter 3 xi Node Parameter Name max records Value 100 ook caa Fig 10 Adding a parameter for a repository Help 3 Select whether you want to add a Node or a Parameter If you want to assign numerous parameters to a repository we recommend that you group the parameters First add the reguired nodes and then one or more parameters below the nodes 4 If you clicked the Node radio button enter a unique name for the new node If you clicked the Parameterradio button enter a name and a value for the parameter 5 Click the OK button Note The repositories C1ickStreamRepository and VipDAVLockRepository save their data in a database table They can only be used ifa JDBC poolis assigned to them This JDBC pool manages the connections to the database To assign a JDBC pool specify the name ofthe respective pool as the value for the parameter store table name poolname default The following table
110. or each HTTP request This problem is reme died by the JSP specification which provides a mechanism for HTTP sessions An HTTP session has the following features Initialization an HTTP session is initialized when the connection between a client and a web server is established for the first time Session ID a session that takes place in the context of a JSP engine is identified by a session ID that is unique for the individual installation The session ID is managed by the JSP engine server Portal Manager API Programmer s Manual 127 Chapter 5 HTTP session timeout an HTTP session is only valid if the client sends a request within a certain period of time Otherwise a timeout occurs in the JSP engine The HTTP session mechanism is used by the Portal Manager API for session management of the WCM JavaBeans and at the same time guar antees WCM authentication for a specific session Authentication Authentication in the Portal Manager API is based on the concept of the WCM user who is characterized by the following attributes m unique user name for a specific installation or for the LDAP server that is used for user administration m password The user information for authorization in the Portal Manager API is stored ina LoginRepository implementation There are various LoginRepository implementations e g VipUserRepository Depending on the use of the Portal Manager API there are various authenticat
111. ory see section Deleting a Repository on page 65 Adding a Repository To add a repository 1 Select Configuration Repositories 2 Choose New repository on the context menu or click the corre sponding icon Ey Icon for adding a repository The dialog box for adding a repository opens new repository xj Name and Java class Give the repository a unique name and assign ita Kal Java class Once the repository has been created K M you can specify any parameters for it A J Name Class name Help Cancel Finish Fig 9 Adding a repository 54 Livelink WCM Server Managing the Portal Manager API 3 In the Name field enter a name for the new repository You have a free choice of name but it must be unique within the WCM system For repositories of type VipObjectRepository and VipObjectHandlerRepository this may be the name of the deployment system You cannot change the name of the repository subsequently 4 Inthe Class name field enter the name of the repository s Java class The class loader uses this name to load the class It is expected that the class implements the Repository interface and has an empty public constructor 5 Click the Finish button Setting the Parameters for a Repository Repositories are configured by means of parameters Type and number of parameters depend on the functions of the repository Parameters may be defined as nodes
112. output channel Sterr default error channel Process one file for all outputs default Thread one file per thread Class one file per class Thread Class one file per thread and class output overwrite This entry is used to overwrite existing log files value true or add the data to existing files value false output limit The maximum size of the output file in KB file path The path to the directory in which the log files are located file prefix The prefix of the file names file suffix clearer delay The suffix of the file names usually the file extension The time in seconds between two runs in order to clean the thread table of no longer running threads If the value is 0 no clean up thread is started only for tests in a productive installation a clean up thread must always be running The time should amount to at least 10 seconds a duration of 60 to 300 seconds is recommended 90 Livelink WCM Server Managing the Portal Manager API Entry Meaning clearer entries trace filter The minimum number of entries in the thread table so that the clean up of this table can be performed at all This entry is only considered if the clean up thread is running There should be 50 to 200 entries in this table The created thread objects use the filter value indicated here to decide which trace outputs are written to the logging channel The filter value is
113. pplications in the Portal Manager API The interaction of the classes is shown in the following class diagram The Session interface connects the SessionBase class with an HTTP session created by the JSP engine interface Session from core interface Application from application The setLocale Locale locale method makes language changes available during run time Fig 37 Class diagram for applications interface Repository from respository The following elements are needed to implement an application 152 Livelink WCM Server Notes on Programming with the Portal Manager API Repository An implementation of the interface Repository is used as a wrapper class to make an external data source WCM capable An application may be associated with O n repositories Application An implementation ofthe interface Application is used as a wrapper class to make the logic of an application WCM capable The application uses the associated repositories to maintain and edit the business objects JavaBean A class deriving from the class SessionApplication packs the Application in a JavaBean which performs the instantia tion of the Application in the context of a JSP page The bean provides the following functionality m linking the bean with a javax servlet http HttpSession The HTTP session provides state support for the stateless HTTP protocol This makes it possible to associate a specific user wi
114. ps are required 1 To set the class path required for the Content server call the script setPomaClasspath bat or sh This script is located in the direc tory WCM installation directory tools 2 Add the class path that was created as the script was called to the class path of the JSP engine 3 Copy the supplied script portalmanager bat or sh which is located in the directory WCM installation directory tools to the root directory of the WCM installation Rename the script name of the Content server bat or sh Portal Manager API Programmer s Manual 31 Chapter 2 4 In the script name of the Content server bat or sh replace all placeholders SERVERNAME with the name of the Content server In order to start the Content server via the script the JSP engine must already be running In the configuration of the JSP engine used the servlet mapping servlet must be entered Note If you set up two or more Content servers on the same computer you must use different instances for your JSP engine for executing the servers After the installation of the WCM system modify the default URL in the scripts for starting the Content servers according to the configuration of the JSP engine used For stopping the Content server use the supplied script shutdown name of the Content server bat or sh Alternately the server can be shut down via the Admin client Programming Concepts In order to use the Porta
115. pt Session Scope Application Scope Content Manager Fig 2 The layer model of the Portal Manager API with session and application scope Repositories Similar to applications repositories are an abstraction allowing uniform accesses to data New applications that are created by using the applica tion interface can access existing repositories or repositories that are yet to be developed Portal Manager API Programmer s Manual 23 Chapter 2 Integrating the Portal Manager API in the WCM System The integration of the Portal Manager API in the WCM system involves different aspects m access of Portal Manager API solutions to WCM system data m integration of Content servers on which the Portal Manager API is available into the WCM system Access to the Data of the WCM System If you look at the solutions based on the Portal Manager API the reposi tory interface connects the Portal Manager API and the WCM system When programming a solution with the Portal Manager API you use beans to access the data of the WCM system The bean requests the necessary repository from the application and establishes a connection to the WCM system via this repository The repository provides the object data from the WCM system for the Portal Manager API solution You can assign repositories and applications to each user via the Admin client see Assigning a Repository to an Application on page 81 There are numerous beans
116. r developing applications Deriving from the RepositoryImpl class As already described the interface Repository functions as a wrapper class for preparing data sources so that the Portal Manager API can access them The abstract basic class RepositoryImp1 provides standard implementa tions for methods which are related to the Portal Manager API This means that only methods that are relevant to the data sources must be implemented in the derived Repository classes A repository in the 154 Livelink WCM Server Notes on Programming with the Portal Manager API context of the Portal Manager API is based on data structures used within the WCM system see section RepositoryMap and associated classes on page 102 The following figure shows all methods that are related to data sources and that are provided by the class RepositoryImp1 All content related repository methods are shown According to the implementation strategy these are possible methods that are implemented in a derived repository class Fig 39 The RepositoryImpl class with all methods relevant to data sources The class derived from the RepositoryImp1 class has its own persis tency mechanism It passes the persistency task to an LDAP or DBMS system e g via a JDBC connection to an RDBMS For a RepositoryImp1 capable implementation it is necessary to imple ment all specified methods For all Repository classes that only support certain methods the no
117. r is assigned a context ID which the WCM system requires for checking the rights Each user writing uses one CA license CA concurrent author which will be returned when the user logs out or the used context ID times out Note The license used is released after one minute even if the user logs out before this minute has elapsed When the minute has elapsed the license will be released together with the user logout Session Management The following class diagram shows the HTTP session management in connection with authentication 130 Livelink WCM Server Notes on Programming with the Portal Manager API Interface interface abstract class HttpSession Session Base BindingListener from core from core from http interface HttpSession from http lt lt sessionld gt gt 1 interface LoginRepository from repository interface EEIE VipProfile from portalmanager Fig 35 Authentication and session management The following main components are used for session management and authentication m HttpSession makes it possible to retrieve a unique session ID for an HTTP request m HttpSessionBindingListener informs the SessionBase class when an HTTP session has ended or started m LoginRepository contains the user information for checking the login request Portal Manager API Programmer s Manual 131 Chapter 5 m SessionBean contains a
118. re developed by the OpenSSL Project for use in the OpenSSL Toolkit http www openssl org and software developed by the Apache Software Foundation http www apache org Trademarks IXOS IXOS SOFTWARE AG SAP R 3 and SAP ArchiveLink are registered trademarks of SAP AG Microsoft Microsoft Windows NT and the names of further Microsoft products are registered trademarks of Microsoft Corporation Acrobat Reader Copyright 1987 Adobe Systems Incorporated All rights reserved Adobe and Acrobat are trademarks of Adobe Systems Incorporated which may be registered in certain jurisdictions Siebel is a registered trademark by Siebel Systems Inc Other product names are used only to identify the products and they may be registered trademarks of the relevant manufacturers Copyright 2005 Gauss Interprise AG Hamburg Gauss Interprise Inc Irvine California All rights reserved worldwide This document and the related software are property of Gauss Interprise AG or its suppliers and protected by copyright and other laws They are distributed under licenses restricting their use copying distribution and decompilation Neither receipt nor possession of this document confers or transfers any right to reproduce or disclose any part of the contents hereof No part of this document may be reproduced in any form by any means without prior written authorization of Gauss Interprise AG or Gauss Interprise Inc Moreover the
119. reference the applicable content m For internationalizing dynamic content made available by applica tions the following must apply m The JavaBeans or applications must support internationalization m A JSP page that instantiates a specific bean or component must define the Locale in accordance with the user settings This is done by obtaining the value accept Language from the header of the HttpRequest object and creating a corresponding Java locale object The following example shows a JSP page that uses intemationalization with a session bean lt body gt lt page import java util Locale gt lt h1 gt Setting the Locale for a WCM bean from the HTTP header lt h1 gt lt jsp useBean id sessionBean class de gauss vip portalmanager SessionBean gt lt sessionBean init request Locale locale request getLocale sessionBean setLocale locale Portal Manager API Programmer s Manual 163 Chapter 5 out println sessionBean locale sessionBean getLocale lt br gt out println sessionBean getI18n getString MY MESSAGE KEY gt lt body gt Supporting Several Languages by Using one Central Template The website structure can be presented as in the following figure Home page de Area1 r Area2 t Images en Area1 t Area2 t Images Fig 42 Structure of a website When users reach the start page of the website they can choose a langua
120. releasing the object can be realized via this type of form based user interface Portal Manager API Programmer s Manual 37 Chapter 2 Statification In order to speed up access to dynamic content it might be useful to convert the code of the dynamic page into static code The term statification refers to the representation of dynamic content on static pages When statification is performed the code of the dynamic page is already executed during the asynchronous generation of the page and the result usually HTML code is saved Statifying pages means freezing the object state and publishing it in the Production view of a website For example in the case of a page containing navigation elements the current navigation status at the time of publication is recorded in the form of static elements on the page Changes in the topic structure released subsequently are not reflected in the statified navigation The dynamic page elements are updated only when the page is regenerated or republished Statification is generally unsuitable for personalized pages as these pages have to react dynami cally i e at runtime to the user data entered Statification of pages depends on various conditions Configuration of the deployment system m Inthe Admin client you determine whether statification is to be performed for all objects of the website for no objects or depending on the object m Inthe Admin client the option Analyze st
121. ries You can now select repositories you would like to KJ assign to this application KS ek Repositories Add Fig 16 Assigning a repository to an application during setup Proceed as follows 1 Click the Add button 2 Inthe list displayed mark the repositories that you want to assign 3 Confirm by clicking the OK button The repositories are included in the wizard 4 Click the Next button 70 Livelink WCM Server Managing the Portal Manager API Assigning Resources The resources form the basis for internationalization in the beans In this dialog box you can configure access to the Java resources new application xj Resources Here you can specify which resources you want to lt assign to the application Once you have created the K S application vou can determine additional parameters n Add Edit Remove Help Cancel Back Fig 17 Assigning resources when adding an application Proceed as follows 1 Click the Add button 2 A dialog box opens in which you enter the name of the resource The resources specified here are loaded via the class path and must correspond to the Java resources for detailed information refer to the Java SDK API documentation of the java util ResourceBundle class 3 Confirm the entries by clicking the OK button The resource is included in the wizard 4 Click the Finish button Portal Manager API Programmer s
122. rpassword and userPassword are not identical Table 6 Sample configuration of a DirectoryRepos i tory Parameter Value url Idap Idapserver company example 389 authentication simple principal LDAP user with the right to add entries credentials password ofthe user entered under principal principal changes LDAP user with the right to change and delete entries Note This parameter is used to assign users to groups and roles This also applies if the logged in user does not have the right to change and delete LDAP entries credentials changes password ofthe user entered under principal changes search scope SUBTREE_SCOPE base ou software o company example group base ou groups ou software o company example Portal Manager API Programmer s Manual 135 Chapter 5 136 Parameter Value role base ou roles ou software o company example dn pattern uid ou software o company example password attrib userPassword mappings mapping LDAP USER ID pomaattr uid ldapattr uid EJ CN pomaattr cn ldapattr cn INIT PASSWORD pomaattr pwdChange ldapattr initPassword VIP ACCESS pomaattr account ldapattr vipAccess LDAP_OBJECTCLASS pomaattr objectclass ldapattr objectClass Livelink WCM Server Notes on Programming with the Portal Manager API Parameter Value TRUSTED L
123. rticular for reading data from an HTML form and saving the form data as XML document The processFilledForm method of the FormData class is of particular importance in this context This method generates an XML document and extracts the metadata for the WCM object from the form data supplied For more information on this method please refer to the Javadoc on the Portal Manager API An additional utility class for processing forms and their data is the Xm1ContentConverter class which allows to directly separate fields from the XML document For further information on this class and its methods please refer to the Javadoc on the Portal Manager API Creating an Object After the content and the metadata for a form instance have been extracted and converted using the processFilledForm method the form instance must be created with the relevant data The VipObjectHandlerBean class see section The VipObjectHandlerBean class on page 121 establishes the connection to the functions of Livelink WCM Server For more information on the methods of this class please refer to the Javadoc on the Portal Manager API The VipObj ectHand1lerBean is also the basis for form supported work with objects of a WCM managed website In principle it is possible to develop an HTML based user interface for Livelink WCM Server Using the methods of the VipObjectHandlerBean all functions from creating a new object to submitting it to Quality Assurance and to
124. rver and a master Content server The website InternetSite is created in the WCM system The system is distributed among three additional proxy Content servers Two of these proxy Content servers run in the context of a JSP engine or as web application in an application server They are used for editing the WCM objects by means of the Content client Thus the respective Edit and QA deployment systems are installed on these two servers The third proxy Content server is used for publishing the Production view of the website On this server a Production deployment system is installed To make the illustration more comprehensible the connections from the master Admin server to the other servers are not contained in the following figure Portal Manager API Programmer s Manual 29 Chapter 2 Master Admin Server mi A Master Content Server Proxy Content Server 3 InternetSite Proxy Content Server 1 Notification in case of changes Notification and transmission of content Fig 4 Distributed WCM system with separate databases If a WCM object is changed the master Content server informs the proxy Content servers 1 and 3 Proxy Content server 1 informs proxy Content server 2 about the changes Deployment for the changed objects is carried out on all the notified servers so that the corresponding pages are updated A distributed system of this kind is created usin
125. s For accessing the data of deployment systems the deployment system of the repository must be installed on a Content server that uses the same data storage as the Content server running in the context of a JSP engine or as web application in an application server In a distributed WCM system it is for example possible that two Edit deployment systems for the same website have been installed on different servers If these two servers have separate data storages the deployment systems also use different data storages when generating pages The Portal Manager API cannot access both Edit deployment systems because this would require simultaneous access to the data of one website via different JDBC pools In such a case two Content servers running in the context of a JSP engine or as web application in an applica tion server are required Portal Manager API Programmer s Manual 25 Chapter 2 Integrating the Portal Manager API in a WCM System The servers are divided into two main categories master and proxy In every WCM system there is one master Administration server and one or several master Content servers The master Administration server handles the user administration and is responsible for configuration system administration and license management The Administration server can be accessed using the Admin client The master Content server manages one or more websites Each website is assigned to exactly one master Cont
126. ser specific account information login repositories In the special case that just the account information represents the data of an application a repository implementation can of course be used for both purposes Login Repositories Login repositories are repositories used for processing account informa tion The Portal Manager API has two login repositories that support the following data sources m account information in an LDAP server DirectoryRepository m account information in the Admin client VipUserRepository the Administration server can also access the LDAP server for this purpose Each login repository uses the user name as a key The account informa tion for the respective users serves as data value These are filed in a RepositoryEntry In this respect the login repositories are equal to the normal repositories After successful authentication of a user the user s password is saved Thus other repositories can use the password again without the user needing to reenter it single sign on support Portal Manager API Programmer s Manual 107 Chapter 4 Class Hierarchy A repository is represented by the Repository interface The Repository interface basically contains access methods that suggest but do not force an implementation by means of a RepositoryMap Some implementations of the Repository interface actually store the repository data as RepositoryMap others forward the method calls to t
127. st of the appli cations not yet assigned 3 Mark the desired application 4 Click the OK button Note You cannot assign two applications with the same logical name to one Content server Portal Manager API Programmer s Manual 85 Chapter 3 Removing assignment of an application to a Content server To remove the assignment of an application to a Content server mark the application in the right window pane Choose Remove assignment of application on the context menu or click the corresponding icon m Icon for removing the assignment of an application to a Content server LDAP By using an LDAP directory service you can considerably reduce admin istration efforts connected with the configuration and maintenance of user data The Portal Manager API is available on all Content servers running in the context of a JSP engine or as web applications in an application server These Content servers access the general data storage of the WCM system As a result the user group and role information of an LDAP directory service can be adopted and used by the Portal Manager API For detailed information on configuring the LDAP integration refer to the Livelink WCM Server Installation Manual The Portal Manager API also offers the possibility to access the LDAP directory service directly The DirectoryRepository class of the Portal Manager API provides LDAP support 86 Livelink WCM Server Managing the Portal Manager
128. structure Sitemaps are also navigation elements Generally speaking however they are not confined to the context of the current page but provide information about the website as a whole In Livelink WCM Server the fact that metadata are stored for each content object provides sufficient information for navigating For each content object the program stores details of those objects that can be reached by hyperlink and those objects from which the active content object can be reached by hyperlink It also stores the references to the parent WCM object and to all WCM objects that are located on the same or a lower level in the topic structure Further information for navigation is provided by the topic tree and by linking a content object to a template object 142 Livelink WCM Server Notes on Programming with the Portal Manager API If the underlying metadata are changed the content is automatically modi fied in the case of a respective implementation without any need for manual modification As a result these navigation elements do not get out of date when objects are deleted copied or moved The Portal Manager API makes dynamic generation of navigation elements possible For example the subtopics of a main topic could be automatically output as subheadings in a menu or sitemaps could give the user an overview of the structure of the website In both cases changes in the structure of the website are taken into account withou
129. t This should be part of the Template Begin gt lt page import de gauss vip repository RepositoryEntry de gauss vip repository RepositoryIterator de gauss lang KeySort de gauss lang StringValue gt lt jsp useBean id sessionBean class de gauss vip portalmanager SessionBean scope session gt lt jsp useBean id objBean class de gauss vip portalmanager VipObjectBean scope session gt lt objBean setRepositoryName VIPDEPLOYMENT_NAME A user has to be logged in otherwise the operations are executed in the content of Anonymous if sessionBean isLoggedIn request The request contains the necessary attributes for the login sessionBean checkLogin request gt lt This should be part of the Template End gt lt get the meta data of the object RepositoryEntry entry objBean getEntry VIPOID if entry null KeySort sort new KeySort new StringValue title get all subelements of the current object which are jsp topics RepositoryIterator it objBean getSubElements entry JSPTOPIC sort gt lt table gt lt while it hasNext RepositoryEntry e it nextEntry gt lt tr gt lt td gt Portal Manager API Programmer s Manual 145 Chapter 5 lt a href lt e getValue url gt gt lt e getValue title gt lt a gt lt td gt lt tr gt lt gt lt table gt lt gt lt bo
130. t West Waterloo Ontario N2L 5Z5 Canada 519 888 7111 If you subscribe to our Software Maintenance Program or would like more information about additional support programs visit Open Text Customer Support at http www opentext com services support html If you have suggestions for this publication send an e mail message to documentation opentext com to contact the Open Text Publications Group Visit our home page at http www opentext com for more information about Open Text products and services 2005 IXOS SOFTWARE AG Bretonischer Ring 12 85630 Grasbrunn Germany Tel 49 89 4629 0 Fax 49 89 4629 1199 eMail lt office ixos de gt Internet http www ixos de All rights reserved including those regarding reproduction copying or other use or communication of the contents of this document or parts thereof No part of this publication may be reproduced transmitted to third parties processed using electronic retrieval systems copied distributed or used for public demonstration in any form without the written consent of IXOS SOFTWARE AG We reserve the right to update or modify the contents Any and all information that appears within illustrations of screenshots is provided coincidentally to better demonstrate the functioning of the software IXOS SOFTWARE AG hereby declares that this information reflects no statistics of nor has any validity for any existing company This product includes softwa
131. t any need to revise the navigation When navigation elements are dynamically generated by means of the methods of the Portal Manager API the users access rights can be taken into account Users have only those navigation options for which they have the necessary rights For example an anonymous user sees different elements than an authorized user More far reaching personaliza tion concepts would filter object information on the basis of attributes in the user profile Design This section outlines how to design dynamic navigation elements Proceed as follows 1 Sketch the layout of the page and consider what HTML elements can be used to implement it 2 On the basis of this plan write the JSP code Consider which parts of the HTML code must be generated dynamically and which beans provide the appropriate methods for obtaining this information Normally hyperlinks to WCM objects within a certain topic are offered as a table or list The number and names of the objects are not known i e the names and or titles and the URLs of all WCM objects below the selected topic are needed Portal Manager API Programmer s Manual 143 Chapter 5 By means of the VIPObjectBean class a RepositoryIterator can be supplied to all objects below the topic It is also possible to only consider objects of a certain type The RepositoryIterator runs through the list of objects Each entry is a RepositoryEntry containing metadata name tit
132. t of Anonymous if sessionBean isLoggedIn request The request contains the necessary attributes for the login sessionBean checkLogin request gt lt This should be part of the Template End gt lt In this example is no check if the retrieved entries are null in my website is object 215 a jsp object RepositoryEntry jsp objBean getEntry 215 ContentHandler chJsp objBean getContent jsp in my website is object 255 a picture object RepositoryEntry pic objBean getEntry 255 ContentHandler chPic objBean getContent pic gt lt table gt lt tr gt lt td gt lt Gets the whole content i e content plus template gt lt chJsp getString gt lt td gt lt td gt lt Returns the content in this case the lt img gt tag gt lt chPic getString new HTMLContentConverter gt lt td gt lt tr gt lt tr gt lt td gt lt This is faster because it is not necessary to load the content gt lt img src lt objBean getUrl 255 gt gt lt td gt lt td gt lt Gets only the content of the object i e content without template gt lt objBean getVipContent jsp gt lt td gt 148 Livelink WCM Server Notes on Programming with the Portal Manager API lt tr gt lt table gt lt body gt lt html gt Using the method getVipContent of the class VipObjectBean you can access the HTML code of the content obje
133. t system Portal Manager API Programmer s Manual 27 Chapter 2 Master Admin Server System data Master Content Server Fig 3 Structure of a minimum system A minimum system is installed by selecting the relevant option in the WCM installation program see Livelink WCM Server Installation Manual In order to create a website in this scenario start the new website wizard in the Admin client and create the website with the option Minimum or Minimum dynamic Distributed WCM System with Separate Data Storages The flexible and scalable system architecture of Livelink WCM Server enables you to set up distributed WCM systems according to your corpo rate structure To minimize data transmission between the individual servers the proxy servers can access separate data storages When using the Portal Manager API in such a scenario please note that a Content server running in the context of a JSP engine or as web applica tion in an application server cannot access different data storages at the same time see also Portal Manager API and Data Storage on page 25 If the data of your website is managed by different proxy Content servers 28 Livelink WCM Server Concepts that access separate data storages these servers must run in the context of a JSP engine or as web application in an application server The following example illustrates such a scenario The WCM system consists of a master Admin se
134. th an HTTP session for authentication purposes m intemationalization support switchable at runtime for an appli cation via the class Internationalization m additional application related functionality Implementing an Application The actual process ofimplementing an application which is derived from the Portal Manager API comprises the following steps 1 Implementing the repositories applications SessionApplication objects Configuring the Portal Manager API to use the new application see section Managing applications starting on page 65 Portal Manager API Programmer s Manual 153 Chapter 5 Deriving the Application Specific Classes To make the procedure easier for the user the Portal Manager API provides abstract basic classes with the basic implementations of all func tionalities connected with the Portal Manager API A user specific applica tion merely has to implement a certain basic class The following diagram shows the general hierarchy for developing applications interface Application from application interface Repository from respository abstract dass Applicationimp from application dass MyApplication from customer Element for packing the Element that represents Element that represents a application in a JavaBean the business logic of an data source used in the that can be instantiated in application application context a JSP page Fig 38 General hierarchy fo
135. that these two parameters are ignored if the deployment name parameter is specified metadata style The metadata scheme used In this parameter you specify whether the repository uses the attribute names and values according to the version 5e or 8 Possible values are 5e and 8 For a comparison of the respective values and attributes refer to appendix A Metadata Schemes Portal Manager API Programmer s Manual 61 Chapter 3 Deleting repository parameters In order to remove a parameter from the configuration of a repository mark the parameter to be deleted in the right window pane Choose Delete parameter on the context menu or click the corresponding icon ml Icon for deleting a parameter C General Settings of Repositories To edit the settings of a repository 1 Select Configuration gt Repositories 2 Mark the desired repository in the tree on the left The settings are displayed in the right window pane You can subse quently change the name of the Java class of the repository The name of the repository itself is defined when the repository is added You cannot change it subsequently 3 Click the Apply button Assigning an Application to a Repository Select Configuration Repositories repository name gt Applications to display an overview of the applications that have already been assigned to the repository The assigned applications are displayed in a list in the right
136. the cache if a reference to the object is added to another object or if a reference to the object is removed 174 Livelink WCM Server Caching Deployment Cache In Livelink WCM Server deployment systems have an integrated cache for the metadata provided by the deployment Thus this data can be supplied directly the second time it is accessed This presupposes that the deployment system is set up on the accessing server usually a Content server running in the context of a JSP engine or as web application in an application server This constellation is recommendable if during normal operation only a few changes are made that have a great impact on the deployment Otherwise the additional effort required for the deployment may result in bottlenecks on the Content server It must be evaluated individually whether faster access to the data of the deployment system compensates for the additional load caused by the separate deployment system Example in your website you use a template cascade that is assigned to more than 10 000 objects Some of the templates are changed regularly once a week After the changed templates have been released all objects affected must be regenerated This causes a higher load on the server Wether a higher load is accept able for your system can be determined by means of performance tests How the Cache for WCM Objects Works The cache for WCM objects is configured in the Admin client in the settings of the
137. the object that uses the trace 4 the name of the current thread 5 the indentation depth as a number 6 the trace text trace acceptclasses As a rule the traces are filtered by checking the entry trace filter Exceptions exist for certain classes explicitly named classes have filter values that deviate from the standard filter values This behavior is very time consuming and can be de activated The value true activates exception treatment of the appropriate classes the value false deactivates it For detailed information refer to the comments of the trace properties file class1 and class2 This entry is used to determine for which class es tracing is to be enabled Possible values are com org pkg Class1 tracing for the class com org pkg tracing for the package com org pkg tracing for the package with all sub packages 92 Livelink WCM Server Managing the Portal Manager API Portal Manager API Programmer s Manual 93 94 Livelink WCM Server CHAPTER 4 Classes and Interfaces of the Portal Manager API This chapter describes the classes that are necessary for understanding the concepts of the Portal Manager API Class Diagrams and Class Descriptions Class Diagrams To give an overview class diagrams are provided with the individual sections of this chapter The entire diagram is available as a file in the directory WCM installation directory documentation manual portalMa
138. the result of a staging action it is removed from the cache Consequently the updated metadata must be reloaded from the database the next time the object is accessed As an object may have different metadata in each view Edit QA Production a separate object is stored in the database and the cache for each view Creation of some metadata is quite time consuming As the Content client usually does not require all metadata only the basic data is read from the database when the object is loaded Thus the server requires less memory and the load process is sped up The metadata that are not loaded the so called data to be loaded with delay are read from the database on demand Portal Manager API Programmer s Manual 173 Appendix B In Livelink WCM Server all special attributes as well as the following data are loaded with delay m pathname m filename m suffix m url m surrogate url m links to m linked from m all children for Oracle only Notes m f you do not want the data to be loaded from the database during operation you should access the data to be loaded with delay directly after loading the object Thus the data can be read from the cache later on m The metadata links toand linked from should only be loaded in exceptional cases as they can only be retrieved by means of a time consuming database request For the metadata item linked from the rule applies that the object is not removed from
139. tion H 2 Pools 2 Custom connection types A Servers Wy Websites C Deployment systems 45 Server agents m JE Utilities Repositories i ClickStreamRepository Q groups 7 E EH EH HEH E mA InternetSite_edit InternetSite prod InternetSite_qa rales users Gh VipDAVLockRepository VipHCLConfigRepository EB VIPHTMLClientConfig tt HE EH HC Fig 8 Overview of available repositories The displayed repositories CLickStreamRepository groups roles users VipDAVLockRepository VipHCLConfigRepository and VIPHTMLCLientConfig are created during the installation of the WCM system These repositories are supplied with the Portal Manager API and should not be deleted The repositories InternetSite edit InternetSite prod and InternetSite ga were automatically added when the website InternetSite was created The following functions are available to you for repositories m adding a repository see the following section m configuring repositories by means of parameters see section Setting the Parameters for a Repository on page 55 m editing repository settings see section General Settings of Reposi tories on page 62 Portal Manager API Programmer s Manual 53 Chapter 3 m overview of assigned applications assign new applications and remove assignments see section Assigning an Application to a Repository on page 62 m removing a reposit
140. tion of the application is deleted from the WCM system the associated Java class is however not deleted Assigning an Application to a Content Server A Content server running in the context of a JSP engine or as a web appli cation in an application server can only access applications that have been assigned to it Select Configuration Servers name of the Content server Applications to display an overview of the applications that have already been assigned to the server The applications are displayed in a list in the right window pane 84 Livelink WCM Server Managing the Portal Manager API Configuration Name ClickStreamApplication F i p Custom connection types WipHCLApplication Servers at FE a Admin VIPHTMLClientApplication E a Master_Content i VipObjectApplication Wy Websites IvipUserApplication Deployment systems EET E Pools 45 Agents gt Services A Secure Access assigned i JE Applications i Fig 21 Applications assigned to a Content server Assigning an application to a Content server To assign an application to a Content server 1 Select Configuration gt Servers name of the Content server gt Applications 2 Choose Assign application on the context menu or click the corre sponding icon Icon for assigning an application to a Content server The Select application dialog box opens It shows a li
141. tion process A professional web content management system such as Livelink WCM Server makes it possible for external staff to work on a distributed basis at their individual locations In this way advertising copy writers and photo agencies can be integrated in the creation of article pages The structure of the content object created in this way is determined by a form The objects created are XML objects known as form instances with a structure corresponding to the structure of the form The elements of these XML objects can then be arranged and formatted as desired on an HTML page Note It is of course possible to create other object types Design A form based entry must always be implemented as a clearly defined program The user interface consists of several components that are inte grated in a workflow and tailored to the program in guestion As a rule the following components are needed m Overview page lists the form instances created and provides buttons for the actions that can be performed on these WCM objects m Input form is used for creating new form instances and provides entry fields selection fields etc for creating the XML objects m Edit form is used for changing existing form instances The field contents and the status of the form instances are shown in editable form m View page is used for preparing the field contents and the status of form instances for display m
142. tive data JVM with SecurityManager The Java 2 platform provides a revised security architecture with finely structured and easily configured security mechanisms To be able to use these functions perform the following steps 1 Integrate a SecurityManager in the server process 2 Create a security mechanism file that provides the program with the rights required for a correct functioning This file can be used to impose considerable restrictions on access by a program compared with the rights granted to a user by the operating system A detailed description of the SecurityManager can be found in the docu mentation on Java 2 Internationalization The Internet and intranet applications are increasingly used globally and designed for users in different countries Thus there is potentially a need to internationalize a solution based on the Portal Manager API The solutions are based on Java so they automatically inherit the interna tionalization support offered by Java This includes m Locale the Locale object as a simple identifier for a language or region m localized resources the ResourceBundle as container for all Locale specific commands and objects 160 Livelink WCM Server Notes on Programming with the Portal Manager API calendar and time zone support Locale specific formatting of numbers dates etc m Locale specific string methods e g Locale specific sorting All functions are described in detai
143. to add entries Example uid admin ou software o company example 58 Livelink WCM Server Managing the Portal Manager API Repository Parameter Description principal changes An LDAP user with write access to the entries in the LDAP directory service If this parameter has not been set entries are changed and deleted in the context of the logged in user principal read An LDAP user with read access to the entries in the LDAP directory service If the parameter has not been set entries are read in the context of the logged in user role base The start node below which the entries for the user s roles are searched If the attribute has not been set the value of base is used for this attribute search scope Describes the search scope below the start node specified in dn pattern SUBTREE_SCOPE searches the entire sub tree beginning with BASE ONELEVEL_SCOPE only searches in the level directly below BASE url The list of URLs to directory servers separated by spaces Initially the first LDAP server is addressed If this fails the second will be addressed etc Example 1dap 1dap company example 389 ldap 1dap2 company example 389 DoorwaysRepository alias An alias for the DoorwaysRepository If no alias has been specified the name of the DoorwayRepository is used in order to establish the connection to the Doorways server This parameter is optional Portal Manager API Pr
144. utomatically when starting an asyn chronous action Possible values are false open or true do not open Default value false DEFAULT VALUE FOR NO OBJECT PREVIEW MODE Determines whether the object preview of the Content client Classic is to be switched off Possible values are false do not switch off or true switch off Default value false DEFAULT VALUE FOR USE DOWNLOAD APPLET Determines whether the Download applet of the Content client Classic is to be used Possible values are false do not use or true use Default value true DEFAULT VALUE FOR USE INTEGRATED HTML EDITOR Determines whether the integrated HTML editor of the Content client Classic is to be used Possible values are false do not use or true use Default value false Portal Manager API Programmer s Manual 77 Chapter 3 Application Parameter DEFAULT VALUE FOR USE NAVIGATION APPLET Description Determines whether the Navigation applet of the Content client Classic is to be used Possible values are false do not use or true use Default value false DEFAULT VALUE FOR USE SEPARATE PREVIEW WINDOW Determines whether a separate browser window is to be opened for the object preview of the Content client Classic Possible values are false no separate window or true sepa rate window Default value false MAX SHOWN FILTER RESULTS Specifies the
145. vides the data directly from there Otherwise the requested data is prepared accordingly For this purpose they may have to be loaded from the database Afterwards the attribute combination with its values is stored in the cache When programming JSP pages you should therefore specify if possible all attributes required on the page when accessing the RepositoryEntry for the first time Thus you do not have to access the database and the database does not have to return values for different attributes Portal Manager API Programmer s Manual 177 178 Livelink WCM Server Glossary Application Interface for a uniform description of an external application Context ID Object that is assigned to a user after successfully logging in to the WCM system A context ID is always unique throughout the entire system It thus precisely identifies a user If a context ID is not used over a certain period of time it expires Deployment system The deployment systems generate pages from the WCM objects and distribute the generated files to the appropriate directories From there the files become visible for the users via an HTTP server Deployment systems may be of various types and categories Dynamization All or part of the content of a website is not generated until runtime JSP engine A module integrated in the web server for running JSP scripts embedded in HTML pages JSP engines generally contain Java comp
146. website Configuration gt Websites website name gt General tab Caching The following parameters can be set m Minimum size number of objects to which the cache is reduced in server idle times The default value is 20000 m Maximum size maximum number of objects in the cache The default value is 45000 Portal Manager API Programmer s Manual 175 Appendix B m Cache reduce interval interval in milliseconds The default value is 7200000 corresponds to 2 hours If the objects in the cache are not accessed during this period objects are removed from the cache until the minimum cache size is reached again When an object is accessed the system first looks for the object in the cache If the object is not in the cache it is loaded from the database Afterwards the object is stored in the cache Three cases are differenti ated The minimum size has not been reached yet The newly loaded object is stored at a free position in the cache The cache grows m The minimum size has been reached the maximum size has not been reached yet The newly loaded WCM object is stored in the cache As a result another object may be removed from the cache This means that the size of the cache does not necessarily increase m The maximum size has been reached The newly loaded WCM object is stored in the cache On the basis of a certain algorithm How often has the object been accessed How long has it been in the c
147. with the same name is created automatically however this name can also be chosen in such a way that the name of the repository differs from the name of the deployment system A deployment system is responsible for exactly one website and one data storage view Edit QA Livelink WCM Server Classes and Interfaces of the Portal Manager API Production By choosing a VipObjectRepository a specific website and a specific view are always specified at the same time The logical name of the underlying application is VipUserApplication m by specifying the website name and the data storage view of the website Edit AA Production This makes it possible to access the objects of a website without setting up deployment systems Repositories configured in such away cannot return deployment specific object data e g URL path Note For further information on the configuration of a VipObjectRepository refer to table 3 Repositories and their parameters on page 57 Individual WCM objects are entries in these repositories All metadata of the WCM objects are keys of these entries The descriptors of this metadata and the values of some metadata are described in the WCM Java API Programmer s Manual or in the Javadoc on the Portal Manager API The VipObjectHandLerBean class Full name de gauss vip portalmanager VipObjectHandlerBean The VipObjectHandlerBean extends the VipObjectBean by the write access to the website objects man
148. ystem Configures the window with the object information for the respective InSite Editing deployment system The following parameters can be added below this parameter node keys space separated list of attributes displayed for each object By default oid title type state and version are displayed width width of the window in pixels height height of the window in pixels VIPHTMLClientApplication DEFAULT VALUE FOR APPLET WORK DIRECTORY Indicates the local working directory for the Download applet of the Content client Classic The value must not be empty and has to be a valid directory Default value c temp DEFAULT VALUE FOR AUTO REFRESH TIME Indicates the period of time in seconds after which the action list of the Content client Classic is automatically updated The value must be a positive integer or 0 Default value 0 76 Livelink WCM Server Managing the Portal Manager API Application Parameter DEFAULT VALUE FOR NAVIGATION APPLET OBJECTLIST POS DEFAULT VALUE FOR NO AUTO TASKMANAGER WINDOW Description Specifies where in the Content client Classic to display the object list when the Navigation applet is used Possible values are 0 below the topic structure 1 to the right of the topic structure 2 within the topic structure Default value 0 Specifies whether the action list of the Content client Classic is to be opened a

Download Pdf Manuals

image

Related Search

Related Contents

ISDN Installation and Test Manual  Zotac ZBOX ID88 Plus  Installation & Service Manual  V7 Mobile Bluetooth Speaker 2W - white    Visão geral  Manual - DATAQ Instruments    

Copyright © All rights reserved.
Failed to retrieve file