BellaDati Extensions API


License

License

GroupId

GroupId

com.belladati
ArtifactId

ArtifactId

extensions-api
Last Version

Last Version

1.1
Release Date

Release Date

Type

Type

jar
Description

Description

BellaDati Extensions API
BellaDati Extensions API
Project URL

Project URL

https://github.com/BellaDati/belladati-extensions-api
Project Organization

Project Organization

BellaDati Inc.
Source Code Management

Source Code Management

https://github.com/BellaDati/belladati-extensions-api

Download extensions-api

How to add to project

<!-- https://jarcasting.com/artifacts/com.belladati/extensions-api/ -->
<dependency>
    <groupId>com.belladati</groupId>
    <artifactId>extensions-api</artifactId>
    <version>1.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.belladati/extensions-api/
implementation 'com.belladati:extensions-api:1.1'
// https://jarcasting.com/artifacts/com.belladati/extensions-api/
implementation ("com.belladati:extensions-api:1.1")
'com.belladati:extensions-api:jar:1.1'
<dependency org="com.belladati" name="extensions-api" rev="1.1">
  <artifact name="extensions-api" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.belladati', module='extensions-api', version='1.1')
)
libraryDependencies += "com.belladati" % "extensions-api" % "1.1"
[com.belladati/extensions-api "1.1"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

belladati-extensions-api

Provides Java API interfaces for building BellaDati Extension endpoints.

Maven Artifact

<dependency>
  <groupId>com.belladati</groupId>
  <artifactId>extensions-api</artifactId>
  <version>1.0</version>
</dependency>

Usage

Extensions API interfaces are implemented by BaseExtensionEndpoint.class, which is superclass for all extension endpoints. You can pass the reference the the BaseExtensionEndpoint to your custom code:

import com.belladati.extensions.UserService;
import com.belladati.extensions.User;

public class MyClass {

	public Object doSomething(com.belladati.extensions.UserService userService) {
		 User user = userService.loadUserByUsername("test_user");
		 return user.getLastLogin();
	}

}

In extension implementation, you can then write:

package com.belladati;

import com.belladati.extension.BaseExtensionEndpoint;
import org.apache.tapestry5.StreamResponse;

public class MyEndpoint extends BaseExtensionEndpoint {

    @Override
    public StreamResponse doGet() {
        String text = String.valueOf(new MyClass().doSomething(this));
        return createStreamResponse(text, "text/plain", 200)
    }   
    
}

Refer to BellaDati Extensions for details on how to use or build the BellaDati Extensions.

com.belladati

BellaDati

BellaDati IoT Platform, Analytics, Machine Learning, Robotics

Versions

Version
1.1
1.0