As mention before, the CMS-ML language includes a set of enumerations, each one composed by a set of literals that are used to set CMS-ML class elements and associations tagged values of a specific type. This sub-section describes each enumeration literal in detail, why they exist in the form of enumeration literals and why not other UML2 element and where they can be used.
The CMS-ML proposes seven enumerations: Languages, VisualStyles, WebPagesTypes, WebCompo- nentTypes, RoleTypes, WebPagePermissionTypes and WebComponentPermissionTypes. Each enumera- tion groups enumeration literals, all of them with the same stereotype, defined in the CMS-ML meta- model. For example, the RoleTypes enumeration will only have enumeration literals with the applied stereotype RoleType.
The CMS concepts that are defined as CMS-ML literals are an extension of the UML2 element Enu- merationLiteral, mainly because no additional detail is required to define them. Using enumeration literals bring an important benefit: the developer can specify a tagged value of a class element or association in the most trivial possible way, only by setting a tagged value with the correct value (already defined in an enumeration).
Another benefit of using enumeration literals is that no additional association or view is required to define new elements. Adding a new enumeration literal element resumes to add a new literal with the required stereotype to the respective enumeration.
Most CMS platforms have support for multi visual styles and languages, so the developer needs to express what language and visual style will be applied to the web application or web page, if the platforms allow that. This is easy done with CMS-ML, first the developer needs to build a list of enumeration literals, with the stereotype Language or VisualStyle, in the enumerations Languages or VisualStyles, respectively. Then every time there is the need to set a language or visual style for a web page or web application, the developer only needs to set the corresponding element tagged value (language or visualStyle tagged value) with an enumeration literal with the right stereotype; sometimes the development tool, like ProjectIT- Studio [65, 66], provides a straightforward way to set these tagged values.
The enumeration literals of CMS-ML offers an easy way to express simple concepts that do not require much detail and are used to recognize special characteristics of an element, which may be required to correctly generate the correspondent artifacts in the CMS platforms. The CMS-ML enumerations and enumeration literals are used in the case studiy presented in Chapter 6, where the reader can find more practical details about the enumerations, literals, associations and class elements.
In a specific CMS platform an element that has the form of a CMS-ML literal, such as Language, may require more detail, this can be easily done in the template for the platform, by adding specific detail in the template and not in the platform independent model; we’ll see this in more detail in the next chapters.
The following sub-sections details each CMS-ML enumeration literals, which extends from the Enu- merationLiteral UML MetaClass.
Language
A Language represents the idiom to be applied to the web application. A web application can have a set of possible languages, but must have one and only one language associated at a time. These elements are not modeled with the CMS-ML, it’s only possible to make a reference to a specific language, which must be posteriorly mapped to a platform artifact. Languages are expressed in the form of enumeration literals with the applied stereotype Language which belongs to the enumeration Languages.
A Language literal can be set to two tagged values: WebApplication.language and WebPage.language.
VisualStyle
The VisualStyle defines the visual specification to be applied to the web application. This specification includes the structure of the web pages, color schemes, images, etc. A web application can have several visual styles that may be applied, but only one can be applied at a time, in fact, one must always applied. These elements are not modeled by the CMS-ML, it’s only possible to make a reference to a specific platform visual style. The visual styles are expressed in the form of enumeration literals with the applied stereotype VisualStyle which belongs to the enumeration VisualStyles.
A VisualStyle literal can be set to two tagged values: WebApplication.visualStyle and WebPage.visualStyle.
WebPageType
A web page type allows an easy way to classify web pages, for example: specifying administrative web page and front public web pages. The web page types are expressed in the form of enumeration literals with the applied stereotype WebPageType which belongs to the enumeration WebPageTypes.
A WebPageType literal can be set to the WebPage.type tagged value.
WebComponentType
Web components can go from calendars to complex shopping catalogs, passing through any type of utility and web feature. Web components can also manage CMS systems content. This way, web components can be of different types, these types are defined in the WebComponentTypes enumeration that contains enumeration literals with the applied stereotype WebComponentType.
A WebComponentType literal can be set to the WebComponent.type tagged value.
RoleType
The roles in CMS systems may be of different types, for example: administration roles or public roles. The role types are expressed in the form of enumeration literals with the applied stereotype RoleType which belongs to the enumeration RoleTypes.
A RoleType literal can be set to the Role.type tagged value.
WebPagePermissionType
A role can have a set of permissions over a web page, the type of these permissions are expressed in the form of an enumeration literals with stereotype WebPagePermissionType, defined in the WebPagePer- missionTypes. Examples of permissions types are: visualize and configure.
WebComponentPermissionType
As the web pages, the web components can also have an access control. This way, a role can have a set of permissions over a web component, the type of these permissions are expressed in the form of a enumeration literals with stereotype WebComponentPermissionType, defined in the WebComponentPer- missionTypes.