Giter VIP home page Giter VIP logo

gatein-management's Introduction

GateIn Management

A management framework to be used within GateIn. Main goal is to provide an extensible framework that plays nicely with the portal while allowing REST services and CLI commands to be automatically consumed.

Installation

mvn clean install

Restful API

Assuming GateIn is running @ http://localhost:8080 using the default portal container 'portal', the entry point of the REST API would be

http://localhost:8080/rest/private/managed-components

From here every resource can be located by performing a GET request and following children links.

By default, a GET request to any managed resource will result in the operation 'read-resource'. You can also specify the operation by adding a query parameter of 'op'. For example

http://localhost:8080/rest/private/managed-components?op=read-resource

is the same as

http://localhost:8080/rest/private/managed-components

Browser content negotiation

For convenience, browser content negotiation is supported by adding a 'format' query parameter to the URL. This should only be used to customize content via a browser. All REST clients should follow the standard of providing an Accept header in the request. The following url:

http://localhost:8080/rest/private/managed-components?format=xml

will return the result in XML format, instead of default JSON.

Note: Browser content defaults to JSON for ease of readability. (JSON addons/plugins for browsers are available).

read-resource

Default operation for GET requests. This request retrieves information about a managed resource, including children and operations.

Formats:

JSON, XML

Http Methods:

GET

Example GET Request @ http://localhost:8080/rest/private/managed-components:

{

    description: "Available operations and children (sub-resources)."
    children: [
        {
            name: "mop"
            description: "MOP (Model Object for Portal) Managed Resource, responsible for handling management operations on navigation, pages, and sites."
            link: {
                rel: "child"
                href: "http://localhost:8080/rest/private/managed-components/mop"
            }
        }
    ]
    operations: [
        {
            operation-name: "read-resource"
            operation-description: "Lists information about a managed resource, including available operations and children (sub-resources)."
            -
            link: {
                rel: "self"
                href: http://localhost:8080/rest/private/managed-components
            }
        }
    ]

}

Command Line Interface (CLI)

The CLI is based on CRaSH and is meant to run as a web application under GateIn. It provides ssh access to perform management operations. The default port for ssh is 2000. To change the port, edit the properties file

cli/src/main/webapp/WEB-INF/crash/crash.properties

Important: gatein-management-cli.war must be added to GateIn as an exploded war file. So to install this, copy the target/gatein-management-cli folder to

$JBOSS_HOME/server/default/deploy/gatein-managmenet-cli.war

SCP

An scp command is provided to be able to download/upload content to the management system. To invoke the scp command run the following

scp -P 2000 root@localhost:portal:/{address}

where root is the username, portal is the portal context, and address is the address/path of the managed resource.

For example to export the site classic from the mop managed component

scp -P 2000 root@localhost:portal:/mop/portalsites/classic.zip

Developers

SPI (extension)

The extension component is a means for registering a managed component for GateIn. The implementation uses the Java 6 ServiceLoader to look up extensions. By adding a

org.gatein.management.spi.ManagementExtension

file under

/META-INF/services/

pointing to your implementation, the SPI framework will load your extension.

gatein-management's People

Contributors

bdaw avatar jpkrohling avatar nscavell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.