Giter Site home page Giter Site logo

shogun-core's Introduction

The SHOGun-Core logo

SHOGun-Core

Build Status Coverage Status

SHOGun-Core is the framework used to build SHOGun, based on several high-quality Open Source frameworks.

Everything you need to know about SHOGun-Core or how you can start with developing is documented in the wiki of this project.

How to pull updated doc/wiki?

On the shogun-core root directory (if wiki/doc has been changed):

  1. If the submodule has not yet been initialized: git submodule update --init --recursive
  2. git submodule foreach git pull origin master
  3. git add ...
  4. git commit
  5. git push ...

shogun-core's People

Contributors

ahennr avatar annarieger avatar buehner avatar chrismayer avatar dependabot[bot] avatar dnlkoch avatar hblitza avatar hwbllmnn avatar jansule avatar kaivolland avatar lukaslohoff avatar marcjansen avatar weskamm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shogun-core's Issues

Use JPA persistance API instead of Hibernate Criteria API

Due to the latest updates, we now get warnings like this:

[http-nio-8081-exec-10] WARN org.hibernate.orm.deprecation - HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated; use the JPA javax.persistence.criteria.CriteriaQuery instead

I think we should address this issue in near future!?

Refactor `getMostSpecificRule` in `GeoServerInterceptorService`

The getMostSpecificRule method in the GeoServerInterceptorService needs to be refactored as the first rule that matches any of the checks in the condition Predicate will be returned as the most specific, even if possible following rules are more specific.

The condition does not compare rules with each other.

Refactoring Trees

As we allready decided we will redesign or introduce a general tree which can be associated with any persistentobject.

This is a first draft of a tree:

tree

REST

  • Create REST-Branch
  • Create package de.terrestris.shogun2.rest
  • Create Controller
  • Support at least the CRUD-operations Basic example
  • Should be as generic as possible
    - [x] Detect Task (Create, Read, Update, Delete) by URI and method (GET, POST, PUT, DELETE)
    - [x] Detect Model

Error when adding WMTS layer

Error occurs when adding a WMTS thorugh shogun2-webapp panel. GetCapabilities is successfull, the layer list is shown and a layer can be selected+added to the application. On layer preview/load in application this error occurs:

shogun-webapp_1 | 14:11:14.322 ERROR de.terrestris.shoguncore.service.GeoServerInterceptorService.getMostSpecificRule() @657 - Got no interceptor rules for this request/response. Usually this should not happen as one has to define at least the basic sets of rules (e.g. ALLOW all WMS requests) when using the interceptor.

Current master branch shogun2-webapp

Shogun webapp

Gentlemen @buehner @marcjansen @dnlkoch @hwbllmnn

Thanks for your and Terrestris contribution to the progress of the global GIS community.

I am working on a small project (myself) based on GeoExt3+Geoserver+QGIS+etc. These days I started learning SHOGun, unfortunately could launch shogun2-client (maybe its due to my little Java knowledge), despite shogun-core and shogun-webapp's proper installation.
When it was launched with Eclipse+Tomcat nothing appeared, however with Sencha cmd:

webapp-sencha-run

Could you please explain the below mentioned in detail? I could not manage to have an index page on my screen.

Note: To get a valid {applicationId} just follow these steps:
* Adapt and open this URL:
  `http://localhost:8080/{webapp-name}/application/findAll.action`
* The response will list all of your current SHOGun2 applications (and normally it should return the default one named _Default Application_ only)
* Find the entry `id` containing the ID of the application (e.g. `"id": 50`)
* Use this ID as GET parameter (see above)

Rethink LayerAppearance

We took this concept from OL3, but in practice I discovered that there might be nearly no case we're an LayerAppearance would be shared by multiple Layers.

For Example:
If you share an appearance with two layers. The opacity and the visible are shared. So if you make one layer initialy invisible. The other layer will be invisbile to. Same for opacity.

In my opinion we should at least move those to properties to the Layer Model.

attribution, minResoltion, maxResoltion might be shared sometimes.

Feedback would be cool, as i need clarification on this topic soon. 👯
@marcjansen @buehner @weskamm @dnlkoch

I would then takle this asap.

PersistentObject issue after upgrading to v0.1.0-SNAPSHOT

After upgrading an existing SHOGun2 project to current master (v0.1.0-SNAPSHOT) I am running into the following issue:
While starting my servlet container (Tomcat v7 in my case) the following exception is thrown while SHOGun tries to init the database content:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 
'contentInitializer': Injection of resource dependencies failed; nested exception is 
org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 
[de.terrestris.shogun2.model.PersistentObject] found for dependency 
[collection of de.terrestris.shogun2.model.PersistentObject]: expected at least 1 bean which 
qualifies as autowire candidate for this dependency. Dependency annotations: 
{@javax.annotation.Resource(shareable=true, lookup=, name=, description=, 
authenticationType=CONTAINER, type=class java.lang.Object, mappedName=), 
@org.springframework.beans.factory.annotation.Qualifier(value=objectsToCreate)}

When I get it right the problem is to inject the 'objectsToCreate' (private List<PersistentObject> objectsToCreate;) in de.terrestris.shogun2.init.ContentInitializer.

I would be thankful for any hint solving this.

Problem when using different versions of Java (eclipse vs. mvn-command)

Do you think the following mistake is worth to be mentioned in a developer-FAQ?

After mvn eclipse:eclipse I got the following error:

Unbound classpath container: 'JRE System Library [JavaSE-1.8]' in project 'shogun2-dao' 

Solution

Use the same Java-version for Eclipse and for executing mvn eclipse:eclipse.
If they differ, you can set the version manually on the command line like:

JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/jre/ mvn eclipse:clean eclipse:eclipse

SHOGun2 (Domain Object) Security

SHOGun2 is a complex system with high security requirements.

We cannot always use the spring authority concept (ROLE_XYZ) to determine which objects within the application are available to a certain class of users. For example User A should only have access to Application A and Application B, but another User B should see Application B and Application C.

Hence we need a security concept on the domain object level.

I've tried two approaches and would like to present them at this point.:

  1. Overwrite the hasPermission expression of Spring.
    • You can inspect this approach here.
    • The approach is based on Part 1 of this tutorial
    • This approach is simple, but (out of the box) not very powerful.
    • A lot of coding is required, especially for every new model class, which could result in error-prone code.
    • We would have to make (a lot of) database requests to check which entity is owned/granted by/to a user, which may result in a bad performance.
  2. Use Spring Domain Object Security (ACLs = Access Control Lists)
    • This approach is explained here. Read it!
    • This approach is (initially) more complex than the first one, but we do not have to reimplement the wheel!
    • In combination with AOP (aspect oriented programming) we can handle the security in a more generic way than the first approach.
    • The concept is less error-prone as we can use (tested) Spring-APIs.

The second approach is my absolute favorite (silver bullet) to handle domain object security. Hence I made a pull request (#36) and would by very happy if it could be merged.

Building archetype fails on travis

For some reason the build/test of the webapp archetype fails on the travis system:

This PR fixes build of new PRs (by not testing the archetype anymore) #262

On a long term, we need a better solution!

Problem with equals implementation

The PersistentObject implements #equals/#hashCode by comparing the modified and created timestamps. This causes problems in certain situations, especially when testing and using mocked up entities. On slow systems, two entities that should have been considered equal will not be equal due to differing timestamps.

We should think about whether to include said fields in equality tests.

data model(ling)

After todays virtual hangout about the data model I'm going to open this issue so we can share our hangoutresults and thoughts about the data model.

First of all I was searching for a tool to create, collaboratively edit and share UML-Projects.
Ther are a lot of tools to do these things...
I decided to use GenMyModel because I read some positive things about it and it has some export functionalities that might be useful.

Actually everybody who knows the link to this UML-Project can edit the models. So i send a mail to the coders attending to the hangout today.

No we can talk about the data model itself...

CSV ExtJS Locale

We should change the key in the CSV from the view name to the viewmodel name and adapt the logic.

This has one simple reason:

If you use the viewmodel with the corresponding value in another view the translated string cannot be found as the view has another xtype. e.g:

Ext.define('MyApp.SuperWindow', {
    extend: 'Ext.window.Window',
    viewModel: 'superwindow',

    bind: {
        title: '{superwindowtitle}'
    },

    initComponent: function(){
        Ext.create('Ext.window.Window', {
            viewModel: this.getViewModel(),
            bind: {
                 title: '{superwindowtitle}'
            }
        })
    }
});

If there is the following value in our CSV MyApp.SuperWindow, config.data.superwindowtitle, "peter", "paul" we get an error with the Ext.window.Window as it doesn't appear in the CSV.

Test properties overwrite the project properties

Disabling the init-script of SHOGun by setting the property init.shogunInitEnabled to false in the file src/main/resources/META-INF/{{my-project}}-init.properties does not work. The reason is that a property with the same name is defined in the file src/main/resources/META-INF/shogun2-webapp-test-init.properties. You have to set the property init.shogunInitEnabled to false in this file to really disable the init-script.
I guess this is no wanted behaviour?

Make spatial database mandatory for SHOGun2

#198 introduced a new class that makes use of a JTS geometry, which is currently persisted as the binary representation of the Java object serialization. This is a working, but not very smart solution.

We should discuss here, if we want to make use of Hibernate Spatial in future to persist the geometries as "real" geometry data types in the database. This would require that the SHOGun2 database must be a spatial database. Afterwards, it should also be possible to visualize the geometries - for example by publishing a Layer based on the territories table from SHOGun2 in a GeoServer.

Update strategy for a SHOGun2-based web application

Hi,

is there an update strategy for an existing SHOGun2-based web application? Due to the changes in the last 2 days (v0.0.3-SNAPSHOT) I updated the base SHOGun2-artifacts and run

$ mvn clean install
$ mvn eclipse:clean eclipse:eclipse

on the src folder.
After that my existing web applications had some errors (which is reasonable due to code changes in the base artifacts). But is there a smooth way to solve them? Or how do you solve this problem?

Thanks for any hint!

Creation of table "user" fails with PostgreSQL

The creation of the database table "user" on startup of the webapp fails with PostgreSQL. The Reason is the fact that "user" is a reserved word in PostgreSQL (see here).
To solve this the table name has to be enclosed by double quotes, which can be achieved in javax.persistance by adding an escaped table name declaration to the model, like this

@Table(name="\"user\"")

If you confirm this error and go along with the proposed solution, I'll provide a PR.

Remove compatibility with Java7 from SHOGun2?

Since Java7 is not maintained / updated any longer (since a couple of time), we should think about removing compatibility with Java7 from SHOGun2 in the future.

@terrestris/devs : What do you think?

Mvn package doen´t generate war file

Hi,

I am trying to test Shogun and I followed instructions here: https://github.com/terrestris/shogun-legacy

After executing:
mvn package

I get this output.


[INFO] Reactor Summary for SHOGun-Core 4.0.1-SNAPSHOT:
[INFO]
[INFO] SHOGun-Core ........................................ SUCCESS [13:14 min]
[INFO] SHOGun-Core (Main) ................................. SUCCESS [11:24 min]
[INFO] SHOGun-Core (Webapp Archetype) ..................... SUCCESS [02:10 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27:01 min
[INFO] Finished at: 2019-10-13T13:46:48+02:00
[INFO] ------------------------------------------------------------------------

There should be a .war file created but is not being generated.

Do you know what can I be missing? @buehner @marcjansen @dnlkoch

Thanks :)

Overhaul the documentation

SHOGun2 is growing and a lot of things have changed but it's been a while ago that the documentation/wiki has been updated.

We need to update the documentation to the latest state of development.

The documentation should also contain information about the permission evaluation as desribed here: #182

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.