1. Field of the Invention
The present invention is directed to an image forming apparatus, an information processing method and a program, and in particular to an image forming apparatus, an information processing method and a program for providing a Web site.
2. Description of the Related Art
Conventionally, Web systems are in wide use as an infrastructure to use applications via a network. In a Web system, applications are implemented as Web applications on a server computer which is called a Web server or an application server. A unique URL (Uniform Resource Locator) is assigned to each Web application. A client (such as a Web browser) specifies a URL corresponding to a desired Web application and transmits an HTTP request, whereby it is possible to display a user interface (Web page) of the Web application and execute business logic implemented on the Web application.
In recent years, there are image forming apparatuses such as copy machines, printers, fax machines and multi-function peripherals (MFPs), functions of which are provided by Web applications. With such an image forming apparatus, the user inputs an URL of the function (Web application) that he/she wants to use using a Web browser or the like, thereby making the user able to remotely use the function.
However, for users, an image forming apparatus is a single apparatus, and it is therefore desirable to create an environment seen by the users as a single Web site rather than a collection of multiple Web applications.
On the other hand, with the recent development of software component technology, each Web application has an increasingly higher degree of independence. Accordingly, with functional enhancement of the image forming apparatuses, today it is possible to flexibly add new Web applications.
Therefore, it is desired not only to make multiple Web applications seen as a single integrated Web site but also to create a Web site capable of flexibly dealing with changes in the structure of Web applications.
In view of the above aspects, the present invention aims at providing an image forming apparatus, an information processing method and a program capable of appropriately integrating multiple Web applications.
In order to solve the above issues, one aspect of the present invention is an image forming apparatus including multiple program executing units; multiple Web page generating units, each corresponding to one of the program executing units and configured to execute a process that corresponds to an HTTP request and generate a Web page for displaying information indicating a result of the process; multiple menu information integrating units, each corresponding to one of the program executing units and configured to obtain, from each of the Web page generating units corresponding to the corresponding program executing unit, a URL of each of the Web page generating units and menu item display information provided for allowing use of the Web page generating units, integrate and store the obtained menu item display information in a first file specific to the corresponding program executing unit, and merge, with the first file, information obtained from another first file specific to another program executing unit; and a menu page generating unit configured to generate, based on information stored in the merged first file, a Web page including menu items provided for allowing use of the Web page generating units.
Embodiments that describe the best mode for carrying out the present invention are explained next with reference to the drawings. The present embodiment is described taking an MFP as an example of the image forming apparatus. The MFP is an image forming apparatus which is a single unit device serving multiple functions of a printer, a copying machine, a scanner, a fax machine and the like.
According to
The engine control board 101 controls individual functions of the MFP 1, such as the plotter engine 11 and the scanner engine 12, and provides its own functions to the OS 102 or the like via an engine I/F (interface).
The OS 102 is an operating system, and runs as a process the JVM 103, each native code service 106 and the like in parallel. The JVM 103 converts bytecode unique to the Java (registered trademark) language to native code operable on the OS 102, which then executes the converted native code. The OSGi platform 104 is standardization technology produced by the OSGi Alliance, and is a software platform for providing an execution environment of software components which are produced on the basis of open software component technologies based on the Java (registered trademark) language. On the OSGi platform 104, Java (registered trademark) language software is implemented in the form of software components called “bundles”. A bundle is formed of a single JAR (Java (registered trademark) ARchive) file, and each bundle can be independently and dynamically (without requiring restart of the MFP 1) installed. The bundles 105 illustrated in
Among such software resources, a Web site is achieved by multiple bundles 105 in the MFP 1.
The HTTP service bundle 105-1 functions as a HTTP server (HTTP daemon). That is, the HTTP service bundle 105-1 controls HTTP communications, such as reception of an HTTP request from a client (Web browser or the like) and transmission of an HTTP response to the client.
Each Web UI content bundle 105-3 functions as a Web application. That is, a unique URL (Uniform Resource Locator) is assigned to each Web UI content bundle 105-3. Each Web UI content bundle 105-3 performs a unique business logic process in response to an HTTP request which specifies the URL assigned to the Web UI content bundle 105-3, and generates Web UI content (a Web page, such as HTML data) for displaying the result of the process.
The Web UI framework bundle 105-2 integrates multiple independent Web UI content bundles 105-3, and performs a process for realizing a single Web site. The integration of multiple Web UI content bundles 105-3 includes, for example, management of information common to the multiple Web UI content bundles 105-3 (e.g. session information, authentication information, and language (display language) information); determination of a Web UI content bundle 105-3 corresponding to an URL specified in an HTTP request (i.e. distribution of an HTTP request); and management of menu structure information of multiple Web UI content bundles 105-3.
The distribution of an HTTP request is performed based on an integrated configuration file 110. The integrated configuration file includes information showing a correspondence between URLs and Web UI content bundles 105-3 (hereinafter, referred to as “URL correspondence information”)). That is, the Web UI framework bundle 105-2 determines a Web UI content bundle 105-3 corresponding to a URL specified in an HTTP request based on the integrated configuration file 110, and calls and causes the determined Web UI content bundle 105-3 to perform a process corresponding to the HTTP request.
The menu structure information is information in which a hierarchical structure of menus and a correspondence between display information (display strings and the like) and a URL (a Web UI content bundle 105-3) with respect to each menu is defined. The menu structure information is stored in the integrated menu file 120. A menu in this specification refers to a menu on a Web page (menu page), which allows usage of each Web UI content bundle 105-3.
Accordingly, the hierarchical relationship between menu items included in the menu 510 and other menus, URLs corresponding to terminal menu items in the hierarchical relationship, and the like are defined in the menu structure information of the example shown in
The menu page 500 is created by a Web UI content bundle 105-3 corresponding to a URL of the menu page 500 (for example, the Web UI content bundle 105-3a). Therefore, the integrated menu file 120 is used by the Web UI content bundle 105-3 to create the menu page 500.
The integrated configuration file 110 and the integrated menu file 120 are stored in, for example, an HDD (Hard Disk Drive) of the MFP 1.
The integrated configuration file 110 and the integrated menu file 120 are automatically generated and updated by the Web UI framework bundle 105-2.
First, each Web UI content bundle 105-3 outputs its menu file and configuration file to a file integration unit 105-21 of the Web UI framework bundle 105-2 (S11, S12 and S13). Alternatively, the file integration unit 105-21 may actively obtain the menu file and the configuration file from each Web UI content bundle 105-3.
Next, the file integration unit 105-21 generates the integrated menu file 120 by integrating the menu files obtained from the individual Web UI content bundles 105-3 (S14). The file integration unit 105-21 generates or updates the integrated configuration file 110 by integrating the configuration files obtained from the Web UI content bundles 105-3 (S15). At this point, the file integration unit 105-21 determines whether there is overlapping in URLs of the Web UI content bundles 105-3. If there is overlapping in the URLs, the file integration unit 105-21 quits generating the integrated configuration file 110 and the like. Note that the integration of the menu files may be achieved by serially arranging descriptive contents of the respective menu files. The integration of the configuration files may be achieved in the same manner.
Subsequently, a request distribution unit 105-22 of the Web UI framework bundle 105-2 obtains the URL correspondence information from the generated or updated integrated configuration file 110 (S16), and registers (reports) a list of URLs included in the URL correspondence information (that is, a list of URLs of Web UI content bundles 105-3 integrated by the Web UI framework bundle 105-2) with the HTTP service bundle 105-1 (S17).
The HTTP service bundle 105-1 receives an HTTP request (for example, an HTTP request transmitted in response to a selection of a menu item made on the menu page 500). In the case where a URL specified in the HTTP request is included in the list reported by the Web UI framework bundle 105-2, the HTTP service bundle 105-1 reports the HTTP request to the request distribution unit 105-22 of the Web UI framework bundle 105-2. The request distribution unit 105-22 determines a Web UI content bundle 105-3 corresponding to the URL of the HTTP request based on the integrated configuration file 110 and calls the determined Web UI content bundle 105-3.
Next is described a process performed when a new Web UI content bundle 105-3 is installed (added) during the operation of the MFP 1.
Assume that a Web UI content bundle 105-3d is newly installed. Following the installation, the Web UI content bundle 105-3d requests the file integration unit 105-21 of the Web UI framework bundle 105-2 to newly register (add) the menu file and configuration file of the Web UI content bundle 105-3d (S21). Subsequently, the file integration unit 105-21 determines, based on the newly added configuration file of the Web UI content bundle 105-3d and the integrated configuration file 110, whether there is an overlapping URL (S22). If there is an overlapping URL, the file integration unit 105-21 quits the process and displays on a not shown operation panel a message or the like urging change of the overlapping URL.
If there is no overlapping URL, the file integration unit 105-21 requests the HTTP service bundle 105-1 to cancel the registration of the list of URLs (S23). Accordingly, the HTTP service bundle 105-1 cancels the list of URLs registered in Step S17 of
Subsequently, the file integration unit 105-21 adds contents of the menu file and the configuration file of the Web UI content bundle 105-3d to the integrated menu file 120 and the integrated configuration file 110 (S24). Then, the request distribution unit 105-22 of the Web UI framework bundle 105-2 registers a list of URLs based on the updated integrated configuration file 110 with the HTTP service bundle 105-1 (S25). As a result, HTTP requests for Web UI content bundles 105-3 are treated as effective on the Web UI framework bundle 105-2.
As described above, the MFP 1 of the first embodiment is capable of creating a single Web site by appropriately integrating Web UI content bundles 105-3 each having a significantly high degree of independence.
Next is described the second embodiment. In the second embodiment, features different from the first embodiment are explained.
As shown in
Basically, the functions (implementation contents) of all JVMs 103 are the same. Note however that, with respect to each JVM 103, an access authority to other JVM environments or native environments is different from the other JVMs 103. Specifically, the core JVM 103a offers an execution environment for bundles 105 having the highest reliability, such as a bundle 105 created by a maker or the like of the MFP 2. Bundles 105 that operate on the core JVM 103a are referred to as “core bundles 105a” for the sake of convenience. The core bundles 105a are able to, for example, directly call (use) all functions offered by the native code services 106 and the engine control board 102. Note that a limit may be placed on the use of the native code services 106 or the engine control board 102 by the core bundles 105a.
The application JVM 103b offers an execution environment for bundles 105 which have lower reliability than the core bundles 105a or whose access to resources of the MFP 2 should be strictly limited. Bundles 105 that operate on the application JVM 103b are referred to as “application bundles 105b” for the sake of convenience. The application bundles 105b are able to directly use functions offered by the native code services 106. Note however that, when compared to the core bundles 105a, a strict limit is placed on the use of the native code services 106 by the application bundles 105b. The application bundles 105b are able to directly use all or part of functions of the core bundles 105a. Note that calls between different JVM environments may adopt publicly known technologies, such as RMI (Remote Method Invocation).
The extension JVM 103c offers an execution environment for bundles 105 which have lower reliability than the application bundles 105b or whose access to resources of the MFP 2 should be strictly limited. Bundles 105 that operate on the extension JVM 103c are referred to as “extension bundles 105c” for the sake of convenience. The extension bundles 105c are able to directly use functions of the core bundles 105a and the application bundles 105b within a predetermined limit range. Note however that the extension bundles 105c are not allowed to directly use functions offered by the native code services 106.
Thus, in the MFP 2, the access authority of each bundle 105 is limited on a JVM environment basis. In the example of
In the above described environment, a Web site is achieved by the following bundle structure according to the second embodiment.
In
The function of each bundle 105 is as described in the first embodiment. Port numbers for receiving HTTP requests are different among the HTTP service bundles 105a-1, 105b-1 and 105c-1, and only the port of the HTTP service bundle 105a-1 is open to the outside (on the network).
According to the second embodiment, there are two Web UI framework bundles 105-2 of the Web UI framework bundles 105b-2 and 105c-2. Accordingly, the second embodiment requires a scheme for integrating two Web UI framework bundles 105-2. An example for achieving such a scheme is described next.
Referring to
Each Web UI content bundle 105b-3 on the application JVM 103b outputs its menu file and configuration file to (the file integration unit of) the Web UI framework bundle 105b-2 (S31). Similarly, each Web UI content bundle 105c-3 on the extension JVM 103c outputs its menu file and configuration file to (the file integration unit of) the Web UI framework bundle 105c-2 (S41).
Subsequently, the Web UI framework bundle 105b-2 generates an integrated menu file 120b by integrating the collected menu files (S32). In addition, the Web UI framework bundle 105b-2 generates or updates an integrated configuration file 110b by the collected configuration files (S33). Similarly, the Web UI framework bundle 105c-2 generates an integrated menu file 120c by integrating the collected menu files (S42). In addition, the Web UI framework bundle 105c-2 generates or updates an integrated configuration file 110c by the collected configuration files (S43). Note that when the configuration files are integrated, whether there is an overlapping URL is determined as in the first embodiment.
Next, the Web UI framework bundle 105b-2 registers a list of URLs based on the integrated configuration file 110b with the HTTP service bundle 105b-1 (S34). Similarly, the Web UI framework bundle 105c-2 registers a list of URLs based on the integrated configuration file 110c with the HTTP service bundle 105c-1 (S44).
Subsequently, the HTTP service bundle 105b-1 reports its registered URL list to the HTTP service bundle 105a-1 on the core JVM 105a-1, and requests the HTTP service bundle 105a-1 to transfer HTTP requests in which URLs included in the list (hereinafter, referred to as “application URL list”) are specified (S35). Similarly, the HTTP service bundle 105c-1 reports its registered URL list to the HTTP service bundle 105a-1, and requests the HTTP service bundle 105a-1 to transfer HTTP requests in which URLs included in the list (hereinafter, referred to as “extension URL list”) are specified (S45).
Note that the processes performed on the application JVM 103b and the extension JVM 103c are described above in parallel; however, these processes do not need to be in synchronization. Note that, as shown in
Herewith, each Web UI framework bundle 105-2 merges the content of the integrated menu file 120 (menu structure information) managed by the other Web UI framework bundle 105-2 and the content of its own integrated menu file 120 to generate a new integrated menu file 120. Accordingly, the integrated menu file 120 having the same content is managed (i.e. the menu structure information is shared) by each Web UI framework bundle 105-2. As a result, even if a Web UI content bundle 105-3 for generating the menu page 500 is implemented on each of the Web UI framework bundles 105-2, the menu pages 500 generated by the respective Web UI content bundles 105-3 have the same menu structure.
Each Web UI framework bundle 105-2 determines if there is overlapping between URLs registered in the integrated configuration file 110 managed by the other Web UI frame work bundle 105-2 and URLs registered in its own integrated configuration file 110. If there is overlapping, the overlapping URL is displayed on the operation panel or the like to prompt the operator to make a correction. Herewith, it is possible to prevent URLs from overlapping over the Web UI framework bundles 105-2 (i.e. over the JVMs 103).
Next is described a process performed when an HTTP request is received.
An HTTP request from a Web browser 51 is received by the HTTP service bundle 105a-1 on the core JVM 103a (S51). Since only the port of the HTTP service bundle 105a-1 is open to the outside as described above, HTTP requests for the Web UI content bundles 105b-3 and 105c-3 of the respective JVMs 103 are collectively received by the HTTP service bundle 105a-1. The HTTP service bundle 105a-1 determines a destination of each received HTTP request based on the URL specified in the HTTP request and the application URL list or the extension URL list. That is, in the case where the received URL is included in the application URL list, the HTTP service bundle 105a-1 transmits the HTTP request to the HTTP service bundle 105b-1 (S52). On the other hand, in the case where the received URL is included in the extension URL list, the HTTP service bundle 105a-1 transmits the HTTP request to the HTTP service bundle 105c-1 (S53). The subsequent operating procedures are the same as those in the first embodiment, and their explanations are therefore omitted here.
Next is described a process performed when an extension bundle 105c which is a new Web UI content bundle 105c-3 is installed (added) during the operation of the MFP 2.
Assume that a Web UI content bundle 105c-3c is newly installed on the extension JVM 103c. Following the installation, the Web UI content bundle 105c-3c requests the Web UI framework bundle 105c-2 to newly register its own menu file and configuration file (S71). Subsequently, the Web UI framework bundle 105c-2 determines, based on the newly added configuration file of the Web UI content bundle 105c-3c and the integrated configuration file 110c, whether there is an overlapping URL (S72). The Web UI framework bundle 105c-2 transmits the configuration file of the Web UI content bundle 105c-3c to the Web UI framework bundle 105b-2, and requests the Web UI framework bundle 105b-2 to determine whether there is an overlapping URL (S73). If there is an overlapping URL, the Web UI framework bundle 105c-2 quits the process and displays on the operation panel a message or the like urging change of the overlapping URL.
Subsequently, the Web UI framework bundle 105c-2 adds contents of the configuration file and the menu file of the Web UI content bundle 105c-3c to the integrated configuration file 110c and the integrated menu file 120c (S74 and S75). Note that requests for cancellation and re-registration of a URL list are placed to the HTTP service bundle 105c-1 before and after, respectively, the update of the integrated configuration file 110c and the integrated menu file 120c, as in the case of the first embodiment.
Next, the Web UI framework bundle 105c-2 reports the update of the menu structure information to the Web UI framework bundle 105b-2 (S76). In response to the report, the Web UI framework bundle 105b-2 obtains the menu structure information (menu structure information stored in the updated menu file 120c) from the Web UI framework bundle 105c-2 (S77), and merges the obtained menu structure information with the integrated menu file 120b (S78).
As described above, the MFP 2 of the second embodiment is capable of creating an integrated Web site for the entire MFP 2 even if the Web UI framework bundles 105-2 are implemented separately on the multiple JVMs 103.
Thus, according to one aspect of the present invention, it is possible to provide an image forming apparatus, an information processing method and a program capable of integrating multiple Web applications.
While the embodiments of the present invention have been described above, it should be noted that the present invention is not limited to the above-described embodiments, and covers all such modifications and alterations without departing from the scope and spirit of the present invention described in the appended claims.
This application is based on Japanese Patent Application No. 2008-143132 filed on May 30, 2008, the contents of which are hereby incorporated herein by reference.
Number | Date | Country | Kind |
---|---|---|---|
2008-143132 | May 2008 | JP | national |