-
Language:
English
-
Language:
English
Red Hat Training
A Red Hat training course is available for Red Hat JBoss Data Virtualization
User Guide Volume 2: Modeshape Tools
This guide is for developers.
Red Hat Customer Content Services
Abstract
Chapter 1. Read Me
1.1. Back Up Your Data
Warning
1.2. Variable Name: EAP_HOME
EAP_HOME
refers to the root directory of the Red Hat JBoss Enterprise Application Platform installation on which JBoss Data Virtualization has been deployed.
1.3. Variable Name: MODE
MODE
will either be standalone
or domain
depending on whether JBoss Data Virtualization is running in standalone or domain mode. Substitute one of these whenever you see MODE
in a file path in this documentation. (You need to set this variable yourself, based on where the product has been installed in your directory structure.)
1.4. Red Hat Documentation Site
Chapter 2. Introduction
2.1. Features of ModeShape Tools
- the ability to publish or upload resources from Eclipse workspaces to ModeShape repositories, and
- the ability to create and edit Compact Node Type Definition (CND) files using the included CND form-based editor.
Note
2.2. ModeShape User Roles
./add-user.sh
script.
- connect - required to access any of the ModeShape WAR applications in JBoss Data Virtualization (REST service, WebDAV service, CMIS service and Repository Explorer) and required to connect to ModeShape using the remote JDBC driver (which is the case for JBDS)
- admin - allows all repository operations, for example, read/write nodes, register/unregister node types, create/delete workspaces, backup/restore, reindex workspaces and unlock any locked nodes.
- readwrite - allows reading/writing nodes but does not allow any of the other operations mentioned for admin role.
- readonly - allows only the reading of nodes (that is navigating node paths).
Chapter 3. Tasks
3.1. Register Repository on New Server
3.1.1. Register Repository on a New Server
Open ModeShape View
- To open the ModeShape view navigate to Window -> Show View -> Other.
- From the Show View dialog, select the ModeShape folder followed by the ModeShape view and click OK.
Figure 3.1. Selecting the ModeShape view
Add ModeShape Repository
- To add a ModeShape repository, click the Create a new server icon that appears in the ModeShape view. This view is located in the lower section of your interface, along with other views such as Servers and Console.
Figure 3.2. Adding a new server for ModeShape repositories
- The New Server dialog will appear. Enter the URL of the server to connect and your authentication information in the New Server dialog. You can test your connection to the server by clicking the Test button.
Figure 3.3. The New Server dialog
- Click the Finish button to add the server to the ModeShape view.
Note
Upon testing the connection, if a connection cannot be established, the ModeShape server can still be created. Use the Reconnect button on the ModeShape View's toolbar to try and connect again at a later time.
Once the server with the ModeShape repository has been added three new options become available within the ModeShape view.
3.1.2. ModeShape Repository Options
- edit server properties,
- delete a server from the server registry, and
- reconnect to the selected server.
Note
3.2. Publish or Unpublish a Resource
3.2.1. Publish or Unpublish a Resource
3.2.2. Publish a Resource
Procedure 3.1. Publish files to a repository
Open ModeShape Publishing Wizard.
- Right-click one or more projects, folders, or files in your Eclipse workspace to view the context menu for those files. The Context menu now includes a ModeShape submenu that allows you to publish or unpublish the resources to your ModeShape repository.
Figure 3.4. ModeShape context submenu
Note
When only one resource is selected you can also view the locations where that resource has been published. The published locations of a resource can be viewed by right-clicking an individual resource and navigating the ModeShape context submenu to the Show Published Locations option. - Select Publish to open the ModeShape Publishing Wizard.
Figure 3.5. ModeShape publishing wizard
Choose ModeShape repository
The publishing wizard allows you to choose which ModeShape Java Content Repositories (JCR) type repository to interact with and displays the selected files the operation will be performed on. When a project or folder is selected, all their included files are acted upon.Choose Publish Area.
Publishing to a Publish Area will automatically sequence your files to extract useful information and make it available to our repository users. Extracted information depends upon the type of file and the configuration of the ModeShape repository. The location where files will be published is constructed by appending the server URL, the names of the JCR repository and workspace, the path to the publish area, and the path of the files and folders within your Eclipse workspace.Version the published files.
As ModeShape now allows for the versioning of published files, you will notice a checkbox labelled Version the published files (change default in your preferences). If you have selected to allow file versioning in your ModeShape preferences, then this checkbox will be checked automatically.If your server instance does not permit the versioning of files, regardless of the settings you choose in the Preferences dialog for ModeShape, the checkbox labelled Version the published files (change default in your preferences) will be inactive.Publish the files.
Choose any other options as appropriate and then select Finish to publish the files.
Warning
When a file is published, a blue arrow will appear next to the file in the tree view.
3.2.3. Unpublish a Resource
Procedure 3.2. Unpublish files to a repository
View the context menu.
To unpublish the files, right-click one or more projects, folders, or files in your Eclipse workspace to view the context menu for those files. The Context menu includes a ModeShape submenu that allows you to unpublish the resources to your ModeShape repository.Unpublish the files.
Select Unpublish to unpublish the files.
Warning
- If you are interacting with a multi-user repository, the version of the file you are unpublishing may have been updated by someone else after you.
- It is important to be sure that a file is no longer necessary when unpublishing, as the file in question will be deleted from the repository with this operation.
When a file is unpublished, the blue arrow next to the file in the tree view will be removed.
3.2.4. Viewing, Publishing or Unpublishing Output in Console View
- the repository where the operation took place,
- how long the operation took,
- the outcome for each file included in the operation,
- a hyperlink that allows you to open the file in an Eclipse editor, and
- a ModeShape repository workspace URL.
Figure 3.6. Console output
3.3. Setting Preferences
3.3.1. Setting Preferences
Procedure 3.3. Setting preferences
Open ModeShape Preferences dialog.
The ModeShape Preferences dialog is accessed by navigating to Window -> Preferences -> ModeShape. This dialog allows you to set whether resource versioning will be used for your ModeShape repository or not.Figure 3.7. ModeShape preferences dialog
Activate resource versioning.
Click the Enable resource versioning checkbox to activate resource versioning.
3.3.2. Ignored Resources
Procedure 3.4. Manage Ignored Resources
Open Ignored Resources Preferences dialog.
Click the Ignored Resources menu item under ModeShape on the Preferences dialog. On this screen you can manage the resources that will not be published to your ModeShape repository.The current excluded file types and folders are presented as the list of checkbox items that appear under the Ignored Resources heading.Figure 3.8. ModeShape: Ignored Resources preferences dialog
Add a new resource to the Ignored Resources list.
To add a new file extension type or folder name to be filtered from publishing, click the New button, enter the details and click the Apply button so that your preference changes are saved.Figure 3.9. ModeShape: Ignored Resources preferences dialog
Remove a resource from the Ignored Resources list.
To remove an entry, select an entry from the list in the Preferences dialog and click the Remove button. Ensure that you click the Apply button so that your preference changes are saved.
Note
Chapter 4. Compact Node Definition (CND) Editor
4.1. Compact Node Definition (CND) Editor
*.cnd
files. The first page is a form-based view of the CND file and the second page is a read-only source view.
Note
- a header section, which displays error messages and a link to open the CND preference page,
- a namespaces section, which displays and allows editing of the namespace mappings defined in the CND, and
- a node types section, which displays and allows editing of the node type definitions defined in the CND.
4.2. Header Section
4.3. Namespaces Section
4.4. Node Types Section
4.5. CND Preference Page
Appendix A. Revision History
Revision History | |||
---|---|---|---|
Revision 6.2.0-4 | Fri Nov 20 2015 | David Le Sage | |
|