All Projects → OrienteerBAP → wicket-orientdb

OrienteerBAP / wicket-orientdb

Licence: Apache-2.0 License
Everything you need to work with Apache Wicket and OrientDB

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to wicket-orientdb

jaulp-wicket
This project is a collection of Apache Wicket components and utilities.
Stars: ✭ 14 (-57.58%)
Mutual labels:  wicket
dropwizard-orient-server
Embedded OrientDB server for dropwizard
Stars: ✭ 16 (-51.52%)
Mutual labels:  orientdb
blogs
Demo application for blog posts at www.wicketinaction.com
Stars: ✭ 56 (+69.7%)
Mutual labels:  wicket
igloo-parent
Our core toolbox based on Spring, Hibernate, Wicket and Bootstrap.
Stars: ✭ 15 (-54.55%)
Mutual labels:  wicket
helloworld-web
Hello World web application in 39 different ways in Java
Stars: ✭ 18 (-45.45%)
Mutual labels:  wicket
guice-persist-orient
Guice integartion for OrientDB
Stars: ✭ 35 (+6.06%)
Mutual labels:  orientdb
OPoster
Scheduling Platform for Social Media Networks. Powered by Orienteer
Stars: ✭ 31 (-6.06%)
Mutual labels:  orienteer
geofiddle
Geometric conversions between different formats and projections
Stars: ✭ 15 (-54.55%)
Mutual labels:  wicket
vertx-graphql-example
Vert.x Server which exposes a GraphQL API
Stars: ✭ 29 (-12.12%)
Mutual labels:  orientdb
vuecket
Power of Vue.JS married with magic of Apache Wicket
Stars: ✭ 31 (-6.06%)
Mutual labels:  wicket
Orientdb
OrientDB is the most versatile DBMS supporting Graph, Document, Reactive, Full-Text and Geospatial models in one Multi-Model product. OrientDB can run distributed (Multi-Master), supports SQL, ACID Transactions, Full-Text indexing and Reactive Queries. OrientDB Community Edition is Open Source using a liberal Apache 2 license.
Stars: ✭ 4,394 (+13215.15%)
Mutual labels:  orientdb

Build Status Coverage Status

wicket-orientdb

Everything you need to work with Apache Wicket and OrientDB. Library contains several functional part which can be used separatly or all together.

Looking for examples? Orienteer - Business Application Platform

Initial setup of application

You should inherit WebApplication class from OrientDbWebApplication to use OrientDB and its authentication with in your application.

public class WicketApplication extends OrientDbWebApplication

Specify connection properties

		getOrientDbSettings().setDBUrl("local:localhost/"+DB_NAME);
		getOrientDbSettings().setAdminUserName("admin");
		getOrientDbSettings().setAdminUserPassword("admin");

Embedded OrientDB Server

If you need to run OrientDB in embedded mode please use EmbeddOrientDbApplicationListener

public class WicketApplication extends OrientDbWebApplication
{
@Override
	public void init()
	{
		super.init();
		getApplicationListeners().add(new EmbeddOrientDbApplicationListener(WicketApplication.class.getResource("db.config.xml"))
		{

			@Override
			public void onAfterServerStartupAndActivation() throws Exception {
				OServerAdmin serverAdmin = new OServerAdmin("localhost/"+DB_NAME).connect("root", "WicketOrientDB");
				if(!serverAdmin.existsDatabase())
			    serverAdmin.createDatabase(DB_NAME, "graph", "local");
			    
			}
			
		});
		getOrientDbSettings().setDBUrl("local:localhost/"+DB_NAME);
		getOrientDbSettings().setAdminUserName("admin");
		getOrientDbSettings().setAdminUserPassword("admin");
	}
}

PropertyModel

To gain access to Orient DB document from your application please use ODocumentPropertyModel instead of common PropertyModel. Important! Following issue have been created to introduce support of custom properties models into wicket: https://issues.apache.org/jira/browse/WICKET-5623 If you interested in using PropertyModel as usual in wicket, please, take a look to following pull request: https://github.com/apache/wicket/pull/74

Security

It's easy to integrate with OrientDB security stuff: You can either specify static required orientDB resources

@RequiredOrientResource(value=ORule.ResourceGeneric.CLASS, specific="ORole", permissions={OrientPermission.READ, OrientPermission.UPDATE})
public class MyPage extends WebPage {
...
@RequiredOrientResources({
	@RequiredOrientResource(value = OSecurityHelper.SCHEMA, permissions=OrientPermission.READ),
	@RequiredOrientResource(value = OSecurityHelper.CLASS, permissions=OrientPermission.READ),
})
public class MyPanel extends Panel {
...

or provide them dynamically: just implement ISecuredComponent

public class SaveSchemaCommand<T> extends SavePrototypeCommand<T> implements ISecuredComponent {
...
	@Override
	public RequiredOrientResource[] getRequiredResources() {
		T object = objectModel.getObject();
		OrientPermission permission = (object instanceof IPrototype<?>)?OrientPermission.CREATE:OrientPermission.UPDATE;
		return OSecurityHelper.requireResource(OSecurityHelper.SCHEMA, null, permission);
	}

OrientDB objects prototypes

Sometimes it's useful to work with object without actual creation of that object. Examples: OClass, OProperty, OIndex - all this objects require pre-creation in DB. Prototyping microframeworks allows creation of 'Prototype' of some objects, modify it and only after that 'realize' it in real environment.

Usage:

OClass oClass = OClassPrototyper.newPrototype();
oClass.setName("MyClass");
oClass.setSuperClass(superClass);
OClass realOClass = ((IPrototype<OClass>)oClass).realizePrototype();
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].