This repository has been archived by the owner on Apr 29, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding first public commit of svn tree.
- Loading branch information
Showing
36 changed files
with
3,659 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
target/ | ||
.svn | ||
**/.svn | ||
private |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,15 @@ | ||
LiQID | ||
===== | ||
|
||
LDAP innoQ ID Manager | ||
LDAP innoQ ID Manager | ||
|
||
This is Library should help java developers to use LDAP-Directories in a simple way. Without the hazzle of JNDI (Java Naming and Directory Interface). | ||
|
||
Model | ||
------------- | ||
|
||
Utils | ||
------------- | ||
|
||
LDAP-Connector | ||
------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<project name="@MODULE@" default="build" basedir="."> | ||
|
||
<target name="check" unless="play.path"> | ||
<fail message="Please specify Play framework path using -Dplay.path=/path/to/framework/home" /> | ||
</target> | ||
|
||
<path id="project.classpath"> | ||
<pathelement path="${play.path}/framework/classes"/> | ||
<fileset dir="${play.path}/framework/lib"> | ||
<include name="*.jar"/> | ||
</fileset> | ||
<fileset dir="${play.path}/framework"> | ||
<include name="*.jar"/> | ||
</fileset> | ||
<fileset dir="lib"> | ||
<include name="*.jar"/> | ||
</fileset> | ||
</path> | ||
|
||
<target name="build" depends="compile"> | ||
<mkdir dir="lib" /> | ||
<copy todir="tmp/classes"> | ||
<fileset dir="src"> | ||
<include name="**/*.properties"/> | ||
<include name="**/*.xml"/> | ||
<include name="**/play.plugins"/> | ||
<include name="**/play.static"/> | ||
</fileset> | ||
</copy> | ||
<jar destfile="lib/@[email protected]" basedir="tmp/classes"> | ||
<manifest> | ||
<section name="Play-module"> | ||
<attribute name="Specification-Title" value="@MODULE@"/> | ||
</section> | ||
</manifest> | ||
</jar> | ||
<delete dir="tmp" /> | ||
</target> | ||
|
||
<target name="compile" depends="check"> | ||
<mkdir dir="tmp/classes" /> | ||
<javac srcdir="src" destdir="tmp/classes" target="1.5" debug="true"> | ||
<classpath refid="project.classpath" /> | ||
</javac> | ||
</target> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Here you can create play commands that are specific to the module, and extend existing commands | ||
|
||
MODULE = '@MODULE@' | ||
|
||
# Commands that are specific to your module | ||
|
||
COMMANDS = ['@MODULE@:hello'] | ||
|
||
def execute(**kargs): | ||
command = kargs.get("command") | ||
app = kargs.get("app") | ||
args = kargs.get("args") | ||
env = kargs.get("env") | ||
|
||
if command == "@MODULE@:hello": | ||
print "~ Hello" | ||
|
||
|
||
# This will be executed before any command (new, run...) | ||
def before(**kargs): | ||
command = kargs.get("command") | ||
app = kargs.get("app") | ||
args = kargs.get("args") | ||
env = kargs.get("env") | ||
|
||
|
||
# This will be executed after any command (new, run...) | ||
def after(**kargs): | ||
command = kargs.get("command") | ||
app = kargs.get("app") | ||
args = kargs.get("args") | ||
env = kargs.get("env") | ||
|
||
if command == "new": | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
self: play -> @MODULE@ @VERSION@ | ||
|
||
require: | ||
- play |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Default ldap messages | ||
# You can specialize this file for each language. | ||
# For exemple, for french create a messages.fr file | ||
|
||
#ldap.name=ldap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# This file defines all module routes (Higher priority routes first) | ||
# | ||
# import these routes in the main app as : | ||
# * / module:ldap | ||
# | ||
# ~~~~ | ||
|
||
GET /? Module.index |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Manifest-Version: 1.0 | ||
X-COMMENT: Main-Class will be added automatically by build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,195 @@ | ||
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>com.innoq</groupId> | ||
<artifactId>liqid</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
</parent> | ||
<groupId>com.innoq.liqid</groupId> | ||
<artifactId>ldap-connector</artifactId> | ||
<packaging>jar</packaging> | ||
<version>1.0-SNAPSHOT</version> | ||
<name>LiQID LDAP-connector</name> | ||
<dependencies> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.0</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.innoq.liqid</groupId> | ||
<artifactId>utils</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.innoq.liqid</groupId> | ||
<artifactId>model</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<sourceDirectory>${basedir}/src</sourceDirectory> | ||
<testSourceDirectory>${basedir}/test</testSourceDirectory> | ||
</build> | ||
<profiles> | ||
<profile> | ||
<id>install-module</id> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin | ||
</artifactId> | ||
<executions> | ||
<execution> | ||
<id>copy-dependencies</id> | ||
<phase>validate</phase> | ||
<goals> | ||
<goal>unpack</goal> | ||
</goals> | ||
<configuration> | ||
<artifactItems> | ||
<artifactItem> | ||
<groupId>com.innoq.liqid</groupId> | ||
<artifactId>utils</artifactId> | ||
<version>${project.version}</version> | ||
<type>jar</type> | ||
<overWrite>false</overWrite> | ||
<outputDirectory>${project.build.directory}/dependency</outputDirectory> | ||
</artifactItem> | ||
<artifactItem> | ||
<groupId>com.innoq.liqid</groupId> | ||
<artifactId>model</artifactId> | ||
<version>${project.version}</version> | ||
<type>jar</type> | ||
<overWrite>false</overWrite> | ||
<outputDirectory>${project.build.directory}/dependency</outputDirectory> | ||
</artifactItem> | ||
</artifactItems> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-antrun-plugin</artifactId> | ||
<inherited>false</inherited> | ||
<executions> | ||
<execution> | ||
<id>install-module</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>run</goal> | ||
</goals> | ||
<configuration> | ||
<tasks> | ||
<property name="play.module" value="${env.PLAY_HOME}/modules/${project.artifactId}-${project.version}"/> | ||
<property name="play.path" value="${env.PLAY_HOME}"/> | ||
<mkdir dir="${project.build.directory}/lib"/> | ||
<jar destfile="${project.build.directory}/lib/${project.artifactId}-deps.jar"> | ||
<!-- <fileset dir="${project.build.directory}/classes"/>--> | ||
<fileset dir="${project.build.directory}/dependency"/> | ||
</jar> | ||
<delete includeemptydirs="true" dir="${play.module}"/> | ||
<echo>installing to ${play.module}</echo> | ||
<mkdir dir="${play.module}"/> | ||
<copy todir="${play.module}"> | ||
<fileset dir="." excludes="**/.svn" includes="commands.py build.xml"/> | ||
<filterset> | ||
<filter token="VERSION" value="${project.version}"/> | ||
<filter token="MODULE" value="${project.artifactId}"/> | ||
</filterset> | ||
</copy> | ||
<copy todir="${play.module}/conf"> | ||
<fileset dir="conf" excludes="**/.svn"/> | ||
<filterset> | ||
<filter token="VERSION" value="${project.version}"/> | ||
<filter token="MODULE" value="${project.artifactId}"/> | ||
</filterset> | ||
</copy> | ||
<copy todir="${play.module}/app"> | ||
<fileset dir="app" excludes="**/.svn"/> | ||
</copy> | ||
<copy todir="${play.module}/lib"> | ||
<fileset dir="${project.build.directory}/lib" excludes="**/.svn"/> | ||
</copy> | ||
<copy todir="${play.module}/src"> | ||
<fileset dir="src" excludes="**/.svn"/> | ||
</copy> | ||
<ant dir="${play.module}" antfile="build.xml" target="build"/> | ||
</tasks> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
<profile> | ||
<id>create-lib</id> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin | ||
</artifactId> | ||
<executions> | ||
<execution> | ||
<id>copy-dependencies</id> | ||
<phase>validate</phase> | ||
<goals> | ||
<goal>unpack</goal> | ||
</goals> | ||
<configuration> | ||
<artifactItems> | ||
<artifactItem> | ||
<groupId>com.innoq.liqid</groupId> | ||
<artifactId>utils</artifactId> | ||
<version>${project.version}</version> | ||
<type>jar</type> | ||
<overWrite>false</overWrite> | ||
<outputDirectory>${project.build.directory}/dependency</outputDirectory> | ||
</artifactItem> | ||
<artifactItem> | ||
<groupId>com.innoq.liqid</groupId> | ||
<artifactId>model</artifactId> | ||
<version>${project.version}</version> | ||
<type>jar</type> | ||
<overWrite>false</overWrite> | ||
<outputDirectory>${project.build.directory}/dependency</outputDirectory> | ||
</artifactItem> | ||
</artifactItems> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-antrun-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>create-lib</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>run</goal> | ||
</goals> | ||
<configuration> | ||
<tasks> | ||
<mkdir dir="${project.build.directory}/lib"/> | ||
<jar destfile="${project.build.directory}/lib/${project.artifactId}.jar"> | ||
<fileset dir="${project.build.directory}/classes"/> | ||
<fileset dir="${project.build.directory}/dependency"/> | ||
</jar> | ||
</tasks> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
</profiles> | ||
</project> |
26 changes: 26 additions & 0 deletions
26
ldap-connector/src/com/innoq/ldap/connector/LdapException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
* LdapException | ||
* 22.05.2012 | ||
* @author Philipp Haussleiter | ||
* | ||
*/ | ||
package com.innoq.ldap.connector; | ||
|
||
import com.innoq.liqid.model.Node; | ||
|
||
public class LdapException extends RuntimeException { | ||
|
||
public LdapException(String msg, Throwable thrwbl){ | ||
super(msg, thrwbl); | ||
} | ||
|
||
public LdapException(Node node, Throwable thrwbl) { | ||
super(thrwbl); | ||
if (node instanceof LdapGroup) { | ||
((LdapGroup) node).debug(); | ||
} | ||
if (node instanceof LdapUser) { | ||
((LdapUser) node).debug(); | ||
} | ||
} | ||
} |
Oops, something went wrong.