Method and system for web application localization using hierarchical resolution
In general, in one aspect, the invention relates to a method for processing requests from client devices. The method includes receiving, from a client device, a request for an entity associated with a web application, where the request is associated with a user, making a first determination, by traversing a logical application hierarchy of the web application, that the user is permitted to view the entity, and based on the first determination, providing the entity to the client device.
1. A method for processing requests from client devices, comprising:
displaying, through a web browser on a client device, a first webpage of a web application, wherein the first webpage comprises a plurality of entities each configured to perform one selected from a group of actions consisting of transitioning to a second webpage and changing information displayed on the first webpage;
receiving, from the client device, a first request associated with an entity of the plurality of entities, wherein the first request is associated with a user;
obtaining, for the user, a set of user qualifiers;
performing a first traversal of a logical application hierarchy of the web application along a traversal path to the first entity, wherein:
for any node encountered along the traversal path, wherein each node is not the entity:
obtaining, for the node, a respective set of node qualifiers;
making a determination that at least one of the set of user qualifiers matches at least one node qualifier of the respective set of node qualifiers; and
based on the determination, proceeding along the traversal path to one selected from a group consisting of a next node and the entity; and
after performing the first traversal:
performing a second traversal of the traversal path to populate a localization data structure, wherein upon completion of the second traversal of the traversal path, the localization data structure comprises a first node localization configuration from a first node and a second node localization configuration from a second node, wherein the first node and the second node are on the traversal path;
after performing the first and second traversals, applying node localization configurations from the localization data structure to the entity to obtain a localized entity;
providing the localized entity to the client device.
2. The method of claim 1 , wherein the logical application hierarchy is a file structure and each node is a folder in the file structure.
3. The method of claim 1 , wherein the entity is one selected from a group consisting of a webpage, a complex object, and an object.
4. A system, comprising:
a processor;
physical storage storing a web application, wherein the web application is stored in a logical hierarchy within the physical storage; and
a web server executing on the processor and programmed to:
display, through a web browser on a client device, a first webpage of the web application, wherein the first webpage comprises a plurality of entities each configured to perform one selected from a group of actions consisting of transitioning to a second webpage and changing information displayed on the first webpage;
receive, from the client device, a first request associated with an entity of the plurality of entities, wherein the first request is associated with a user;
obtain, for the user, a set of user qualifiers;
perform a first traversal of a logical application hierarchy of the web application along a traversal path to the first entity, wherein:
for any node encountered along the traversal path, wherein each node is not the entity:
obtain, for the node, a respective set of node qualifiers;
make a determination that at least one of the set of user qualifiers matches at least one node qualifier of the respective set of node qualifiers; and
based on the determination, proceed along the traversal path to one selected from a group consisting of a next node and the entity; and
after performing the first traversal:
perform a second traversal of the traversal path to populate a localization data structure, wherein upon completion of the second traversal of the traversal path, the localization data structure comprises a first node localization configuration from a first node and a second node localization configuration from a second node, wherein the first node and the second node are on the traversal path;
after performing the first and second traversals, apply node localization configurations from the localization data structure to the entity to obtain a localized entity;
provide the localized entity to the client device.
5. The system of claim 4 , wherein the logical application hierarchy is a file structure and each node is a folder in the file structure.
6. The system of claim 4 , wherein the entity is one selected from a group consisting of a webpage, a complex object, and an object.
7. A non-transitory computer readable medium comprising computer readable program code which, when executed by a computer processor, enables the computer processor to perform a method, the method comprising:
displaying, through a web browser on a client device, a first webpage of a web application, wherein the first webpage comprises a plurality of entities each configured to perform one selected from a group of actions consisting of transitioning to a second webpage and changing information displayed on the first webpage;
receiving, from the client device, a first request associated with an entity of the plurality of entities, wherein the first request is associated with a user;
obtaining, for the user, a set of user qualifiers;
performing a first traversal of a logical application hierarchy of the web application along a traversal path to the first entity, wherein:
for any node encountered along the traversal path, wherein each node is not the entity:
obtaining, for the node, a respective set of node qualifiers;
making a determination that at least one of the set of user qualifiers matches at least one node qualifier of the respective set of node qualifiers; and
based on the determination, proceeding along the traversal path to one selected from a group consisting of a next node and the entity; and
after performing the first traversal:
performing a second traversal of the traversal path to populate a localization data structure, wherein upon completion of the second traversal of the traversal path, the localization data structure comprises a first node localization configuration from a first node and a second node localization configuration from a second node, wherein the first node and the second node are on the traversal path;
after performing the first and second traversals, applying node localization configurations from the localization data structure to the entity to obtain a localized entity;
providing the localized entity to the client device.
8. The non-transitory computer readable medium of claim 7 , wherein the logical application hierarchy is a file structure and each node is a folder in the file structure.
9. The non-transitory computer readable medium of claim 7 , wherein the entity is one selected from a group consisting of a webpage, a complex object, and an object.
10. The method of claim 1 , wherein the set of user qualifiers comprises a user identifier and at least one selected from a group consisting of a role, a subscription, a geographic location, a tenant, and a device type.
11. The method of claim 1 , wherein each set of node qualifiers comprises at least one selected from a group consisting of a set of roles comprising the role, a set of subscriptions comprising the subscription, a set of geographic locations comprising the geographic location, a set of tenants comprising the tenant, and a set of device types comprising the device type.
12. The system of claim 4 , wherein the set of user qualifiers comprises a user identifier and at least one selected from a group consisting of a role, a subscription, a geographic location, a tenant, and a device type.
13. The system of claim 4 , wherein each set of node qualifiers comprises at least one selected from a group consisting of a set of roles comprising the role, a set of subscriptions comprising the subscription, a set of geographic locations comprising the geographic location, a set of tenants comprising the tenant, and a set of device types comprising the device type.
14. The non-transitory computer readable medium of claim 7 , wherein the set of user qualifiers comprises a user identifier and at least one selected from a group consisting of a role, a subscription, a geographic location, a tenant, and a device type.
15. The non-transitory computer readable medium of claim 7 , wherein each set of node qualifiers comprises at least one selected from a group consisting of a set of roles comprising the role, a set of subscriptions comprising the subscription, a set of geographic locations comprising the geographic location, a set of tenants comprising the tenant, and a set of device types comprising the device type.