LightAdmin

Pluggable data management solution for Java web applications developed in a "Rapid" manner

License

License

GroupId

GroupId

org.lightadmin
ArtifactId

ArtifactId

lightadmin
Last Version

Last Version

1.2.0.RC1
Release Date

Release Date

Type

Type

jar
Description

Description

LightAdmin
Pluggable data management solution for Java web applications developed in a "Rapid" manner
Project URL

Project URL

http://lightadmin.org
Project Organization

Project Organization

LA Team
Source Code Management

Source Code Management

http://github.com/la-team/light-admin

Download lightadmin

How to add to project

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

Dependencies

compile (44)

Group / Artifact Type Version
org.springframework : spring-core jar
org.javassist : javassist jar
org.springframework : spring-context jar
org.springframework : spring-beans jar
org.springframework : spring-web jar
org.springframework : spring-webmvc jar
org.springframework : spring-tx jar
org.springframework : spring-jdbc jar
org.springframework.security : spring-security-core jar
org.springframework.security : spring-security-config jar
org.springframework.security : spring-security-web jar
org.springframework.security : spring-security-taglibs jar
org.springframework.data : spring-data-jpa jar
org.springframework.data : spring-data-rest-webmvc jar
org.eclipse.persistence : javax.persistence Optional jar
org.hibernate : hibernate-validator jar
javax.validation : validation-api jar
org.apache.tiles : tiles-core jar
org.apache.tiles : tiles-api jar
org.apache.tiles : tiles-extras jar
org.apache.tiles : tiles-servlet jar
org.apache.tiles : tiles-jsp jar
org.apache.tiles : tiles-el jar
com.google.guava : guava jar
org.apache.commons : commons-lang3 jar
commons-fileupload : commons-fileupload jar
commons-io : commons-io jar
org.apache.commons : commons-collections4 jar 4.0
net.sourceforge.collections : collections-generic jar 4.01
net.sf.ehcache : ehcache-web jar 2.0.4
joda-time : joda-time jar
joda-time : joda-time-hibernate jar 1.3
org.jadira.usertype : usertype.core jar 3.2.0.GA
org.jadira.usertype : usertype.spi jar 3.2.0.GA
com.fasterxml.jackson.core : jackson-core jar
com.fasterxml.jackson.core : jackson-annotations jar
com.fasterxml.jackson.core : jackson-databind jar
com.fasterxml.jackson.datatype : jackson-datatype-joda jar
com.fasterxml.jackson.datatype : jackson-datatype-hibernate4 jar
org.imgscalr : imgscalr-lib jar 4.2
org.apache.tika : tika-core jar 1.4
javax.servlet.jsp.jstl : javax.servlet.jsp.jstl-api jar
org.glassfish.web : jstl-impl jar 1.2
org.slf4j : slf4j-api jar

provided (3)

Group / Artifact Type Version
javax.el : javax.el-api jar
javax.servlet : javax.servlet-api jar
javax.servlet.jsp : javax.servlet.jsp-api jar

test (4)

Group / Artifact Type Version
org.springframework : spring-test jar
org.hibernate : hibernate-entitymanager jar
junit : junit jar
org.easymock : easymock jar 3.2

Project Modules

There are no modules declared in this project.

LightAdmin - [PoC] Pluggable CRUD UI library for Java web applications

The primary goal of this PoC project is to speed up application development by bringing pluggable fully operational data management back-end for JPA based applications and to relieve your codebase for more important stuff.

Features

  • DSL configurations: Allows developers to easily configure their administration user interface
  • Displaying persistent entities: Customizable Listing & Quick Views with paging & sorting capabilities
  • CRUD operations: Complete entities manipulation support (including their associations)
  • Automatic Validation: JSR-303 annotation-based validation rules support
  • Search: Allows users to search entities by text fields, dates, numeric values & associations
  • Filtering Scopes: Use scopes to filter data by predefined criteria
  • Pluggable Security: Authentication based on Spring Security
  • REST API: Enriching your application with REST API based on Spring Data REST
  • Easy integration: Servlet 2.5/3.0 web applications supported

Integration examples

Documentation & Support

Bug Reports

License

  • LightAdmin is released under version 2.0 of the Apache License.

Contribute

You're interested in contributing to LightAdmin? AWESOME. Here are the basic steps:

  • Fork LightAdmin from here: http://github.com/la-team/light-admin
  • Clone your fork
  • Hack away
  • If necessary, rebase your commits into logical chunks, without errors
  • Verify your code by running the test suite, and adding additional tests if able
  • Push the branch up to GitHub
  • Send a pull request to the la-team/light-admin project

We'll do our best to get your changes in!

Getting started

Declare maven dependency for using with Spring 4.0.X directly from Maven Central

<dependency>
  <groupId>org.lightadmin</groupId>
  <artifactId>lightadmin</artifactId>
  <version>1.2.0.RC1</version>
</dependency> 

or

<dependency>
  <groupId>org.lightadmin</groupId>
  <artifactId>lightadmin</artifactId>
  <version>1.2.0.BUILD-SNAPSHOT</version>
</dependency> 

For snapshots and LightAdmin compatible with Spring 3.2.X, please declare LA Nexus repositories:

<repositories>
  <repository>
    <id>lightadmin-nexus-releases</id>
    <url>http://lightadmin.org/nexus/content/repositories/releases</url>
    <releases>
      <enabled>true</enabled>
      <updatePolicy>always</updatePolicy>
    </releases>
  </repository>
  <repository>
    <id>lightadmin-nexus-snapshots</id>
    <url>http://lightadmin.org/nexus/content/repositories/snapshots</url>
    <snapshots>
      <enabled>true</enabled>
      <updatePolicy>always</updatePolicy>
    </snapshots>
  </repository>  
</repositories>

And dependency

<dependency>
  <groupId>org.lightadmin</groupId>
  <artifactId>lightadmin</artifactId>
  <version>1.0.0.M2</version>
</dependency> 

Enable LightAdmin web-module in your web.xml if you have one:

<context-param>
  <param-name>light:administration:base-url</param-name>
  <param-value>/admin</param-value>
</context-param>

<context-param>
  <param-name>light:administration:security</param-name>
  <param-value>true</param-value>
</context-param>

<context-param>
  <param-name>light:administration:base-package</param-name>
  <param-value>[package with @Administration configurations, ex.: org.lightadmin.demo.config]</param-value>
</context-param>

Or enable LightAdmin web-module in your WebApplicationInitializer:

@Override
public void onStartup(ServletContext servletContext) throws ServletException {
  servletContext.setInitParameter(LIGHT_ADMINISTRATION_BASE_URL, "/admin");
  servletContext.setInitParameter(LIGHT_ADMINISTRATION_BACK_TO_SITE_URL, "http://lightadmin.org");
  servletContext.setInitParameter(LIGHT_ADMINISTRATION_BASE_PACKAGE, "org.lightadmin.administration");

  super.onStartup(servletContext);
}

Include your JPA persistence provider of choice (Hibernate, EclipseLink, OpenJpa) and setup basic Spring JPA configuration.

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:jdbc="http://www.springframework.org/schema/jdbc"
       xmlns:jpa="http://www.springframework.org/schema/data/jpa"
       xsi:schemaLocation="http://www.springframework.org/schema/jdbc 
                           http://www.springframework.org/schema/jdbc/spring-jdbc.xsd
                           http://www.springframework.org/schema/beans
                           http://www.springframework.org/schema/beans/spring-beans.xsd
                           http://www.springframework.org/schema/data/jpa
                           http://www.springframework.org/schema/data/jpa/spring-jpa.xsd">
  
  <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
    <property name="dataSource" ref="dataSource" />
    <property name="jpaVendorAdapter">
      <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" />
    </property>
  </bean>

  <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
    <property name="entityManagerFactory" ref="entityManagerFactory" />
  </bean>

</beans>

Create an entity:

@Entity
public class User {

  @Id
  @GeneratedValue(strategy = GenerationType.AUTO)
  private Integer id;
  private String firstname;
  private String lastname;
       
  // Getters and setters
}

Create an @Administration configuration in the package defined in web.xml previously:

public class UserAdministration extends AdministrationConfiguration<User> {

  public EntityMetadataConfigurationUnit configuration( EntityMetadataConfigurationUnitBuilder configurationBuilder ) {
    return configurationBuilder.nameField( "firstname" ).build();
  }

  public ScreenContextConfigurationUnit screenContext( ScreenContextConfigurationUnitBuilder screenContextBuilder ) {
    return screenContextBuilder
      .screenName( "Users Administration" )
      .menuName( "Users" )
      .build();
  }

  public FieldSetConfigurationUnit listView( final FieldSetConfigurationUnitBuilder fragmentBuilder ) {
    return fragmentBuilder
      .field( "firstname" ).caption( "First Name" )
      .field( "lastname" ).caption( "Last Name" )
      .build();
  }

Voila! You have a brand new LightAdmin back-end configured.

Check Out and Build from Source

  1. Clone the repository from GitHub:

     $ git clone git://github.com/la-team/light-admin.git
    
  2. Navigate into the cloned repository directory:

     $ cd light-admin
    
  3. The project uses Maven to build:

     $ mvn clean install
    

Running from the Command Line

By default, the app will run in 'embedded' mode which does not require any external setup. The Tomcat 7 Maven plugin is configured for you in the POM file.

  1. Navigate into demo application directory:

     $ cd lightadmin-sandbox
    
  2. Launch Tomcat from the command line:

     $ mvn tomcat7:run
    
  3. Access the deployed webapp at

     http://localhost:8080/lightadmin-sandbox
    

LightAdmin integration example

We prepared an example how easily you can integrate LightAdmin back-end to existing web application.

It's based on Spring Travel reference application.

  1. Clone the repository from GitHub:

     $ git clone git://github.com/la-team/lightadmin-spring-travel.git
    
  2. Navigate into the cloned repository directory:

     $ cd lightadmin-spring-travel
    
  3. The project uses Maven to build:

     $ mvn clean install
    
  4. Launch Tomcat from the command line:

     $ mvn tomcat7:run
    
  5. Access the deployed webapp at

     http://localhost:8080/booking-mvc
    

Screenshots

Login to LightAdmin:

Login view

Dashboard:

Dashboard view

List of persistent entities configured:

List view

Search entities by criteria:

List view & Filtering

Quick view for particular entity:

Quick view

Editing entity:

Form view

Show entity with all fields:

Show view

org.lightadmin

la-team

Smart software development team

Versions

Version
1.2.0.RC1
1.0.1.RELEASE
1.0.0.RELEASE
1.0.0.RC1