Business Service Control Localization

and subdirectories. The resource bundles for Business Service Control are located within the src directory and are copied to the WASP-INFclasses directory during build phase. Resource keys naming convention The resource key is composed of JSP file name without suffix and an English identifier in camel notation. Capital letters are used to indicate the start of words, instead of a space or underscore. If the JSP file is located in some subdirectory of the top-level directory, the subdirectory name is also encoded in the resource key. For example resources for JSP file s e a r c h i n t e r f a c e s s i m p l e . j s p a r e s t o r e d i n t h e f i l e com.systinet.uddi.bui.standard.component.search.SearchMessages.properties and all keys have the prefix interfaces.simple_. In some configuration files it is necessary to use a custom resource bundle instead of the default bundle. There is a way to encode the custom resource bundle name into the resource key. If the resource key contains the character , then the part before it will be treated as the resource bundle identifier and the rest of the resource key as actual resource key. For example customBundleresourceKey. Localization of Configuration The configuration files are localizable too. For example the file confbsc.xml has texts in the resource bundle com.systinet.uddi.bui.framework.BSCMessages.properties . The attributes like caption and hint have their localizable alternatives captionKey and hintKey, which have precedence over the original attributes providing text. The exception to this rule is the task element in the file confweb_component.xml, where caption attribute has precedence over new captionKey attribute. JSP localization The localization of JSP files uses the standard formatting tag library. Every JSP must start with import of this library and setting of the locale for the current user, if he is logged in. The users language is stored in the session variable userDefaultLanguage . Example 21. Example of localization taglib prefix=fmt uri=http:java.sun.comjstlfmt c:if test={not empty globalSession[userName]} fmt:setLocale value={globalSession[userDefaultLanguage]} scope=page c:if fmt:setBundle basename=com.systinet.uddi.bui.standard.component.search.SearchMessages var=search_Message fmt:message key=interfaces.simple_operationProperty bundle={search_Message} In addition to the full power of the standard formatting library there are several extensions that complement localization needs. ParseResourceKey tag The parseResourceKey tag is used, when the resource key can contain an embedded resource bundle. It detects such a situation and introduces two new variables that will hold the values of resource bundle and resource key to be used. Page 568 ParseResourceKey tag Table 80. ParseResourceKey tag Parameters Required Description Param yes The resource key that may contain an embedded custom resource bundle. key yes Default resource bundle to use if no custom bundle is detected. defaultBaseName yes Name of variable that will hold the name of the bundle for this resource. varBundle yes Name of variable that will hold resource key. varResource Example 22. ParseResourceKey tag - Usage Example syswf:parseResourceKey key={captionKey} defaultBaseName=com.systinet.uddi.bui.framework.WebComponentMessages varBundle=bundleName varResource=finalCaptionKey fmt:setBundle basename={bundleName} var=dynamic_Message fmt:message key={finalCaptionKey} var=dialogCaption bundle={dynamic_Message} LocalizedFileName tag LocalizedFileName tag finds the name of the localized file for the current locale. It uses the same heuristic search as resource bundle loading. For example if there is a file scripts.js and the french locale is set, then scripts_fr.js may be returned. Table 81. localizedFileName tag Parameters Required Description Param yes Prefix to be concatenated to fileName to access a resource from the servlet context. basedir no Name of file whose localized version is needed. fileName yes Name of variable that will hold the file name for the current locale. var Example 23. localizedFileName - Usage Example syswf:localizedFileName basedir=..webroot fileName=jsbui.js var=jsBui script language=JavaScript src=c:out value={jsBui}script LocalizedInclude tag Sometimes it is necessary to localize very long text and it would not be practical to store it in a resource bundle as a key, especially when the text contains formatting information. For this purpose there is a tag localizedInclude, which writes to output the content of file selected in the current locale. The rules for file selection are same as for Resource bundles. Table 82. localizedInclude tag Parameters Required Description Param yes Path to resource with the text to be written to output. baseName Example 24. localizedInclude - Usage Example syswf:localizedInclude baseName=publishservicegenericselectInterfaces.html Page 569 LocalizedInclude tag Java localization The localization of web applications uses standard resource bundles. It is necessary to use com.systinet.webfw.util.BundleHelper instead of java.util.ResourceBundle to retrieve a resource bundle otherwise different rules for locale selection will be used in the java code and JSP files, which results in page with portions in different languages.

3.8.2. Directory Structure

The following table summarize the directories inside bsc.jar. Table 83. bsc.jar Directories Description Directory Configuration files of the Business Service Control. See Section 3.8.3, Business Service Control Configuration conf JSP files jsp Source Java files src Compiled Java and JSP classes, libraries, and SOAP stack configuration files WASP-INF Static content of Business Service Control pages such as HTML, Javascript, graphics and CSS. webroot The bsc.jar package depends on the UDDI-service package. So services in the UDDI-service package are available to Business Service Control developers. If you want to edit and modify any of the Business Service Controls source JSP or Java files, perform the following steps: 1. Unzip bsc.jar to a temporary location. 2. Edit the source files. 3. Compile the Java sources against the libraries in the REGISTRY_HOMElib directory and the client libraries from the REGISTRY_HOMEdist directory. 4. Copy the resulting .class files into the WASP-INFclasses directory of the unzipped JAR. 5. Stop Oracle Service Registry 6. To preserve any changes made to the Business Service Control configuration at runtime, copy the contents of directory REGISTRY_HOMEworkuddibsc.jarconf to the conf directory of the unzipped JAR. 7. Zip the JAR again and deploy it over the original file in the REGISTRY_HOMEappuddi directory. If you intend to change the JSP files only for testing purposes, you do not have to redeploy the bsc.jar. It is sufficient to modify the JSP files in REGISTRY_HOMEworkuddibsc.jarjsp. You must reload pages in the browser before any change is visible. Note that files under REGISTRY_HOMEwork are liable to be overwritten or deleted when packages are re-deployed. conf Directory This directory contains the following configuration files: Page 570 conf Directory Table 84. conf Directory Contents Description File The Business Service Control configuration file. This contains the configuration of tabs, user profiles, URLs, paging limits, enterprise classifications, and settings for the approval process and subscription components. Also API endpoints and a flag determining whether SOAP communication is used for these. See Section 3.8.3, Business Service Control Configuration . bsc.xml The deployment configuration file. This contains Business Service Control deployment information such as web interface URLs and contexts. It also defines the location of JSP files, their pre-compiled versions and declared libraries for the JSP engine. web.xml The web framework configuration file. This contains the web frameworks static settings including definitions of components, tasks and data types, and configuration for menus, context menus, trees and customizable taxonimies. web_component.xml This describes components in terms of their roles, relationships and interfaces. component_description.xml jsp directory This directory contains the JSP files that constitute the base of the Business Service Control and the following subdirectories: Table 85. jsp Directory Contents Contents JSP files Directory Account management account Approval process interface part of tools section. approval Report section of console, includes also entity details pages browse Catalog section of console catalog Common pages for table component actions common Content of configuration section configuration Design including miscellaneous page and frame headers and footers design Component editor components editor Catalog section of the console publish Query framework components query Search section of console search Table framework components table Taxonomy framework components taxonomy Tools section components tools Utility components such as navigationPath util Entity list view pages of console view Configuration files for JSP pages including declaration of use, tag libraries, etc. WEB-INF The wizardIterator framework component wizard Page 571 jsp directory