--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.argeo.slc.akb.services</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+ <bean id="akbRepository" class="org.argeo.jackrabbit.JackrabbitWrapper"
+ init-method="init" destroy-method="destroy">
+ <property name="cndFiles">
+ <list>
+ <value>/org/argeo/slc/akb/akb.cnd</value>
+ </list>
+ </property>
+ <property name="repository" ref="nodeRepository" />
+ <property name="bundleContext" ref="bundleContext" />
+ </bean>
+</beans>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
+ xsi:schemaLocation="http://www.springframework.org/schema/osgi \r
+ http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
+ http://www.springframework.org/schema/beans \r
+ http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
+\r
+ <!-- LABEL -->\r
+ <beans:bean class="org.argeo.security.core.OsgiModuleLabel">\r
+ <beans:property name="bundleContext" ref="bundleContext" />\r
+ </beans:bean>\r
+\r
+ <!-- REFERENCES -->\r
+ <reference id="nodeRepository" interface="javax.jcr.Repository"\r
+ filter="(argeo.jcr.repository.alias=node)" />\r
+ <reference id="authenticationManager"\r
+ interface="org.springframework.security.AuthenticationManager" />\r
+ <!-- SERVICES -->\r
+ <service ref="akbRepository" interface="javax.jcr.Repository">\r
+ <service-properties>\r
+ <beans:entry key="argeo.jcr.repository.alias" value="akb" />\r
+ </service-properties>\r
+ </service>\r
+</beans:beans>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<beans xmlns="http://www.springframework.org/schema/beans"\r
+ xmlns:util="http://www.springframework.org/schema/util" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
+ xsi:schemaLocation="\r
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
+ http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd">\r
+\r
+ <!-- <bean id="akbService" class="org.argeo.slc.akb.core.AkbServiceImpl" \r
+ init-method="init" destroy-method="destroy"> <property name="repository" \r
+ ref="peopleRepository" /> <property name="managedRoles" ref="managedRoles" \r
+ /> </bean> -->\r
+ <bean\r
+ class="org.argeo.security.core.AuthenticatedApplicationContextInitialization">\r
+ <property name="authenticationManager" ref="authenticationManager" />\r
+ </bean>\r
+</beans>
--- /dev/null
+dn: dc=demo,dc=slc,dc=argeo,dc=org
+objectClass: domain
+objectClass: extensibleObject
+objectClass: top
+dc: gr
+
+dn: ou=Roles,dc=demo,dc=slc,dc=argeo,dc=org
+objectClass: organizationalUnit
+objectClass: top
+ou: Roles
+
+dn: ou=Akb,dc=demo,dc=slc,dc=argeo,dc=org
+objectClass: organizationalUnit
+objectClass: top
+ou: Akb
+
+dn: uid=demo,ou=Akb,dc=demo,dc=slc,dc=argeo,dc=org
+objectClass: organizationalPerson
+objectClass: person
+objectClass: inetOrgPerson
+objectClass: top
+cn: Demo User
+description: Default demo user
+givenname: Demo
+mail: demo@localhost
+sn: User
+uid: demo
+userpassword:: e1NIQX1pZVNWNTVRYytlUU9hWURSU2hhL0Fqek5USkU9
+
+dn: uid=consultant,ou=Akb,dc=demo,dc=slc,dc=argeo,dc=org
+objectClass: organizationalPerson
+objectClass: person
+objectClass: inetOrgPerson
+objectClass: top
+cn: Consultant
+description: Consultant
+givenname: Consultant
+mail: consultant@localhost
+sn: User
+uid: consultant
+userpassword:: e1NIQX1pZVNWNTVRYytlUU9hWURSU2hhL0Fqek5USkU9
+
+dn: uid=manager,ou=Akb,dc=demo,dc=slc,dc=argeo,dc=org
+objectClass: organizationalPerson
+objectClass: person
+objectClass: inetOrgPerson
+objectClass: top
+cn: Manager
+description: Manager
+givenname: Manager
+mail: manager@localhost
+sn: User
+uid: manager
+userpassword:: e1NIQX1pZVNWNTVRYytlUU9hWURSU2hhL0Fqek5USkU9
+
+dn: uid=root,ou=Akb,dc=demo,dc=slc,dc=argeo,dc=org
+objectClass: person
+objectClass: inetOrgPerson
+objectClass: organizationalPerson
+objectClass: top
+cn: Slc Demo System
+description: Superuser
+givenname: Slc Demo
+mail: root@localhost
+sn: System
+uid: root
+userpassword:: e1NIQX1pZVNWNTVRYytlUU9hWURSU2hhL0Fqek5USkU9
+
+dn: cn=admin,ou=Roles,dc=demo,dc=slc,dc=argeo,dc=org
+objectClass: groupOfNames
+objectClass: top
+cn: admin
+member: uid=root,ou=Akb,dc=demo,dc=slc,dc=argeo,dc=org
+
+dn: cn=consultant,ou=Roles,dc=demo,dc=slc,dc=argeo,dc=org
+objectClass: groupOfNames
+objectClass: top
+cn: consultant
+member: uid=root,ou=Akb,dc=demo,dc=slc,dc=argeo,dc=org
+member: uid=demo,ou=Akb,dc=demo,dc=slc,dc=argeo,dc=org
+member: uid=manager,ou=Akb,dc=demo,dc=slc,dc=argeo,dc=org
+member: uid=consultant,ou=Akb,dc=demo,dc=slc,dc=argeo,dc=org
+
+dn: cn=manager,ou=Roles,dc=demo,dc=slc,dc=argeo,dc=org
+objectClass: groupOfNames
+objectClass: top
+cn: manager
+member: uid=root,ou=Akb,dc=demo,dc=slc,dc=argeo,dc=org
+member: uid=manager,ou=Akb,dc=demo,dc=slc,dc=argeo,dc=org
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<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>org.argeo.slc</groupId>
+ <artifactId>modules</artifactId>
+ <version>1.1.15-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
+ <artifactId>org.argeo.slc.akb.services</artifactId>
+ <name>SLC AKB - Services</name>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <configuration>
+ <instructions>
+ <Import-Package>
+ *,
+ org.argeo.slc.akb
+ </Import-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.argeo.slc</groupId>
+ <artifactId>org.argeo.slc.akb</artifactId>
+ <version>1.1.15-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+</project>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java" />
+ <classpathentry kind="src" path="src/main/resources" />
+ <classpathentry kind="con"
+ path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6" />
+ <classpathentry kind="con"
+ path="org.eclipse.pde.core.requiredPlugins" />
+ <classpathentry kind="output" path="target/classes" />
+</classpath>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.argeo.slc.akb.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
--- /dev/null
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
--- /dev/null
+<?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:p="http://www.springframework.org/schema/p"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+</beans>
--- /dev/null
+<?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:p="http://www.springframework.org/schema/p"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+</beans>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
+ xmlns:osgi="http://www.springframework.org/schema/osgi"\r
+ xsi:schemaLocation="http://www.springframework.org/schema/osgi \r
+ http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
+ http://www.springframework.org/schema/beans \r
+ http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"\r
+ osgi:default-timeout="30000">\r
+\r
+ <beans:description>AKB UI</beans:description>\r
+ <!-- REFERENCES -->\r
+ <reference id="repository" interface="javax.jcr.Repository"\r
+ filter="(argeo.jcr.repository.alias=akb)" cardinality="0..1" />\r
+</beans:beans>
\ No newline at end of file
--- /dev/null
+<?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:p="http://www.springframework.org/schema/p"
+ xmlns:util="http://www.springframework.org/schema/util"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd">
+
+ <!-- Views -->
+ <bean id="akbDefaultView" class="org.argeo.slc.akb.ui.views.AkbDefaultView"
+ scope="prototype">
+ <property name="repository" ref="repository" />
+ </bean>
+</beans>
--- /dev/null
+source.. = src/main/java/,\
+ src/main/resources,
+
+output.. = target/classes/
+bin.includes = META-INF/,\
+ .,\
+ icons/,\
+ plugin.xml
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <!-- Perspective -->
+ <extension
+ point="org.eclipse.ui.perspectives">
+ <perspective
+ class="org.argeo.slc.akb.ui.AkbEnvPerspective"
+ icon="icons/akb.png"
+ id="org.argeo.slc.akb.ui.akbEnvPerspective"
+ name="AKB">
+ </perspective>
+ <perspective
+ class="org.argeo.slc.akb.ui.AkbTemplatesPerspective"
+ icon="icons/akb.png"
+ id="org.argeo.slc.akb.ui.akbTemplatesPerspective"
+ name="AKB Templates">
+ </perspective>
+ </extension>
+ <!-- Views -->
+ <extension
+ point="org.eclipse.ui.views">
+ <view
+ class="org.argeo.eclipse.spring.SpringExtensionFactory"
+ icon="icons/akb.png"
+ id="org.argeo.slc.akb.ui.akbDefaultView"
+ name="Search"
+ restorable="true">
+ </view>
+ </extension>
+ <!-- Editors -->
+ <extension
+ point="org.eclipse.ui.editors">
+ </extension>
+ <!-- Commands -->
+ <extension
+ point="org.eclipse.ui.commands">
+ </extension>
+
+ <!-- Menus -->
+ <extension
+ point="org.eclipse.ui.menus">
+ </extension>
+</plugin>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<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>org.argeo.slc</groupId>
+ <artifactId>plugins</artifactId>
+ <version>1.1.15-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
+ <artifactId>org.argeo.slc.akb.ui</artifactId>
+ <name>SLC AKB UI</name>
+ <packaging>jar</packaging>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <configuration>
+ <instructions>
+ <Bundle-Activator>org.argeo.slc.akb.ui.AkbUiPlugin</Bundle-Activator>
+ <Require-Bundle>
+ org.eclipse.ui;resolution:=optional,
+ org.eclipse.core.runtime;resolution:=optional,
+ org.eclipse.rap.ui;resolution:=optional,
+ org.eclipse.rap.ui.workbench;resolution:=optional
+ </Require-Bundle>
+ <Import-Package>
+ *,
+ org.argeo.eclipse.spring,
+ </Import-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+
+ <!-- AKB -->
+ <dependency>
+ <groupId>org.argeo.slc</groupId>
+ <artifactId>org.argeo.slc.akb.services</artifactId>
+ <version>1.1.15-SNAPSHOT</version>
+ </dependency>
+
+ <!-- COMMONS -->
+ <!-- Base Argeo Eclipse Utilities -->
+ <dependency>
+ <groupId>org.argeo.commons.base</groupId>
+ <artifactId>org.argeo.eclipse.ui</artifactId>
+ <version>${version.argeo-commons}</version>
+ </dependency>
+
+ <!-- RAP only dependency, needed at compile time -->
+ <dependency>
+ <groupId>org.argeo.commons.base</groupId>
+ <artifactId>org.argeo.eclipse.ui.rap</artifactId>
+ <version>${version.argeo-commons}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.argeo.commons.base</groupId>
+ <artifactId>org.argeo.eclipse.ui.jcr</artifactId>
+ <version>${version.argeo-commons}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.argeo.commons.server</groupId>
+ <artifactId>org.argeo.server.jcr</artifactId>
+ <version>${version.argeo-commons}</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
--- /dev/null
+package org.argeo.slc.akb.ui;
+
+import org.argeo.slc.akb.ui.views.AkbDefaultView;
+import org.eclipse.ui.IFolderLayout;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IPerspectiveFactory;
+
+public class AkbEnvPerspective implements IPerspectiveFactory {
+ public static final String ID = AkbUiPlugin.PLUGIN_ID + ".akbEnvPerspective";
+
+ @Override
+ public void createInitialLayout(IPageLayout layout) {
+ String editorArea = layout.getEditorArea();
+ layout.setEditorAreaVisible(true);
+ layout.setFixed(false);
+
+ IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT,
+ 0.3f, editorArea);
+ left.addView(AkbDefaultView.ID);
+ }
+}
--- /dev/null
+package org.argeo.slc.akb.ui;
+
+import org.eclipse.swt.graphics.Image;
+
+/** Shared icons. */
+public class AkbImages {
+
+ public final static Image LOGO_SMALL = AkbUiPlugin.getImageDescriptor(
+ "icons/smallerOrnamentLogo.png").createImage();
+}
--- /dev/null
+package org.argeo.slc.akb.ui;
+
+import org.argeo.slc.akb.ui.views.AkbDefaultView;
+import org.eclipse.ui.IFolderLayout;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IPerspectiveFactory;
+
+public class AkbTemplatesPerspective implements IPerspectiveFactory {
+ public static final String ID = AkbUiPlugin.PLUGIN_ID + ".akbTemplatesPerspective";
+
+ @Override
+ public void createInitialLayout(IPageLayout layout) {
+ String editorArea = layout.getEditorArea();
+ layout.setEditorAreaVisible(true);
+ layout.setFixed(false);
+
+ IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT,
+ 0.3f, editorArea);
+ left.addView(AkbDefaultView.ID);
+ }
+}
--- /dev/null
+package org.argeo.slc.akb.ui;
+
+/** Defines some constants that are used all across the user interface **/
+public interface AkbUiConstants {
+
+ /* Default formats */
+ public final static String DEFAULT_DATE_FORMAT = "EEE, dd MMM yyyy";
+ public final static String DEFAULT_DATE_TIME_FORMAT = "EEE, dd MMM yyyy 'at' HH:mm";
+ public final static String DEFAULT_NUMBER_FORMAT = "#,##0.0";
+}
--- /dev/null
+package org.argeo.slc.akb.ui;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class AkbUiPlugin extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.argeo.slc.akb.ui"; //$NON-NLS-1$
+
+ // The shared instance
+ private static AkbUiPlugin plugin;
+
+ /**
+ * The constructor
+ */
+ public AkbUiPlugin() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
+ * )
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
+ * )
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static AkbUiPlugin getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Returns an image descriptor for the image file at the given plug-in
+ * relative path
+ *
+ * @param path
+ * the path
+ * @return the image descriptor
+ */
+ public static ImageDescriptor getImageDescriptor(String path) {
+ return imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
+}
\ No newline at end of file
--- /dev/null
+package org.argeo.slc.akb.ui.views;
+
+import javax.jcr.Repository;
+import javax.jcr.Session;
+
+import org.argeo.slc.akb.ui.AkbUiPlugin;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.part.ViewPart;
+
+/** Basic view that display a list of items with a quick search field. */
+public class AkbDefaultView extends ViewPart {
+ // private final static Log log = LogFactory.getLog(QuickSearchView.class);
+
+ public static final String ID = AkbUiPlugin.PLUGIN_ID + ".akbDefaultView";
+
+ /* DEPENDENCY INJECTION */
+ private Session session;
+
+ // This page widgets
+ private TableViewer itemViewer;
+ private Text filterTxt;
+ private final static String FILTER_HELP_MSG = "Search...";
+
+ @Override
+ public void createPartControl(Composite parent) {
+ GridLayout gl = new GridLayout();
+ gl.horizontalSpacing = gl.verticalSpacing = gl.marginWidth = 0;
+ parent.setLayout(gl);
+
+ // Filter
+ Composite cmp = new Composite(parent, SWT.NO_FOCUS);
+ cmp.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
+ createFilterPart(cmp);
+
+ // // Table
+ // cmp = new Composite(parent, SWT.NO_FOCUS);
+ // cmp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ // itemViewer = createListPart(cmp, new EntitySingleColumnLabelProvider(
+ // peopleService));
+ //
+ // refreshFilteredList();
+ }
+
+ private void createFilterPart(Composite parent) {
+ parent.setLayout(new GridLayout());
+ // Text Area for the filter
+ filterTxt = new Text(parent, SWT.BORDER | SWT.SEARCH | SWT.ICON_SEARCH
+ | SWT.ICON_CANCEL);
+ filterTxt.setMessage(FILTER_HELP_MSG);
+ filterTxt.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
+ filterTxt.addModifyListener(new ModifyListener() {
+
+ public void modifyText(ModifyEvent event) {
+ // refreshFilteredList();
+ }
+ });
+ }
+
+ // protected TableViewer createListPart(Composite parent,
+ // ILabelProvider labelProvider) {
+ // TableViewer v = new TableViewer(parent);
+ // v.setLabelProvider(labelProvider);
+ //
+ // TableColumn singleColumn = new TableColumn(v.getTable(), SWT.V_SCROLL);
+ // TableColumnLayout tableColumnLayout = new TableColumnLayout();
+ // tableColumnLayout.setColumnData(singleColumn, new ColumnWeightData(85));
+ // parent.setLayout(tableColumnLayout);
+ //
+ // // Corresponding table & style
+ // Table table = v.getTable();
+ // table.setLinesVisible(true);
+ // table.setHeaderVisible(false);
+ //
+ // v.setContentProvider(new BasicNodeListContentProvider());
+ // v.addDoubleClickListener(peopleUiService
+ // .getNewNodeListDoubleClickListener(peopleService, null));
+ // return v;
+ // }
+
+ @Override
+ public void dispose() {
+ // JcrUtils.logoutQuietly(session);
+ super.dispose();
+ }
+
+ @Override
+ public void setFocus() {
+ }
+
+ // protected void refreshFilteredList() {
+ // try {
+ // List<Node> persons = JcrUtils.nodeIteratorToList(doSearch(session,
+ // filterTxt.getText(), PeopleTypes.PEOPLE_PERSON,
+ // PeopleNames.PEOPLE_LAST_NAME,
+ // PeopleNames.PEOPLE_PRIMARY_EMAIL));
+ // personViewer.setInput(persons);
+ // } catch (RepositoryException e) {
+ // throw new PeopleException("Unable to list persons", e);
+ // }
+ // }
+ //
+ // /** Build repository request */
+ // private NodeIterator doSearch(Session session, String filter,
+ // String typeName, String orderProperty, String orderProperty2)
+ // throws RepositoryException {
+ // QueryManager queryManager = session.getWorkspace().getQueryManager();
+ // QueryObjectModelFactory factory = queryManager.getQOMFactory();
+ //
+ // Selector source = factory.selector(typeName, typeName);
+ //
+ // // no Default Constraint
+ // Constraint defaultC = null;
+ //
+ // // Parse the String
+ // String[] strs = filter.trim().split(" ");
+ // if (strs.length == 0) {
+ // // StaticOperand so = factory.literal(session.getValueFactory()
+ // // .createValue("*"));
+ // // defaultC = factory.fullTextSearch("selector", null, so);
+ // } else {
+ // for (String token : strs) {
+ // StaticOperand so = factory.literal(session.getValueFactory()
+ // .createValue("*" + token + "*"));
+ // Constraint currC = factory.fullTextSearch(
+ // source.getSelectorName(), null, so);
+ // if (defaultC == null)
+ // defaultC = currC;
+ // else
+ // defaultC = factory.and(defaultC, currC);
+ // }
+ // }
+ //
+ // Ordering order = null, order2 = null;
+ //
+ // if (orderProperty != null && !"".equals(orderProperty.trim()))
+ // order = factory.ascending(factory.lowerCase(factory.propertyValue(
+ // source.getSelectorName(), orderProperty)));
+ // if (orderProperty2 != null && !"".equals(orderProperty2.trim()))
+ // order2 = factory.ascending(factory.propertyValue(
+ // source.getSelectorName(), orderProperty2));
+ //
+ // QueryObjectModel query;
+ // if (order == null) {
+ // query = factory.createQuery(source, defaultC, null, null);
+ // } else {
+ // if (order2 == null)
+ // query = factory.createQuery(source, defaultC,
+ // new Ordering[] { order }, null);
+ // else
+ // query = factory.createQuery(source, defaultC, new Ordering[] {
+ // order, order2 }, null);
+ // }
+ // query.setLimit(ROW_LIMIT.longValue());
+ // QueryResult result = query.execute();
+ // return result.getNodes();
+ // }
+
+ /* DEPENDENCY INJECTION */
+ public void setRepository(Repository repository) {
+ // try {
+ // session = repository.login();
+ // } catch (RepositoryException e) {
+ // throw new PeopleException("Unable to initialize "
+ // + "session for view " + ID, e);
+ // }
+ }
+ }
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java" />
+ <classpathentry kind="src" path="src/main/resources" />
+ <classpathentry kind="con"
+ path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6" />
+ <classpathentry kind="con"
+ path="org.eclipse.pde.core.requiredPlugins" />
+ <classpathentry kind="output" path="target/classes" />
+</classpath>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.argeo.slc.akb</name>
+ <comment></comment>
+ <projects>
+ <project>org.argeo.connect.people</project>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
--- /dev/null
+source.. = src/main/java/,\
+ src/main/resources,
+
+output.. = target/classes/
+bin.includes = META-INF/,\
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<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>org.argeo.slc</groupId>
+ <version>1.1.15-SNAPSHOT</version>
+ <artifactId>runtime</artifactId>
+ <relativePath>..</relativePath>
+ </parent>
+ <artifactId>org.argeo.slc.akb</artifactId>
+ <name>SLC AKB - Specifications and Core</name>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <configuration>
+ <instructions>
+ <Import-Package>
+ *,
+ javax.jcr.nodetype,
+ </Import-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.argeo.commons.server</groupId>
+ <artifactId>org.argeo.server.jcr</artifactId>
+ <version>${version.argeo-commons}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.argeo.commons.security</groupId>
+ <artifactId>org.argeo.security.core</artifactId>
+ <version>${version.argeo-commons}</version>
+ </dependency>
+ </dependencies>
+</project>
--- /dev/null
+package org.argeo.slc.akb;
+
+/** Centralizes all AKB specific constants */
+public interface AkbConstants {
+ public final static String AKB_BASE_PATH = "/akb:system";
+}
--- /dev/null
+package org.argeo.slc.akb;
+
+/**
+ * SLC AKB's specific exception. For the time being, it just wraps a usual
+ * RuntimeException
+ */
+public class AkbException extends RuntimeException {
+ private static final long serialVersionUID = 1L;
+
+ public AkbException(String message) {
+ super(message);
+ }
+
+ public AkbException(String message, Throwable e) {
+ super(message, e);
+ }
+
+}
--- /dev/null
+package org.argeo.slc.akb;
+
+/** Maps AKB specific JCR Property names with java constants */
+public interface AkbNames {
+
+ public final static String AKB_CONNECTOR_URL = "akb:connectorUrl";
+
+}
\ No newline at end of file
--- /dev/null
+package org.argeo.slc.akb;
+
+/** Maps AKB specific JCR node types with java constants */
+public interface AkbTypes {
+
+ public final static String ARGEO_NOTE = "argeo:note";
+
+
+ // Env and templates
+ public final static String AKB_ENV_TEMPLATE = "akb:envTemplate";
+ public final static String AKB_ENV= "akb:env";
+
+ // Connectors
+ public final static String AKB_CONNECTOR = "akb:connector";
+
+ // Item tree
+ public final static String AKB_ITEM_FOLDER = "akb:itemsFolder";
+ public final static String AKB_ITEM = "akb:item";
+
+ // Various items types
+ public final static String AKB_SSH_FILE = "akb:sshFile";
+ public final static String AKB_SSH_COMMAND = "akb:sshCommand";
+ public final static String AKB_JDBC_QUERY = "akb:jdbcQuery";
+ public final static String AKB_NOTE = "akb:note";
+
+
+}
\ No newline at end of file
--- /dev/null
+<akb = 'http://www.argeo.org/ns/akb'>
+
+//
+// MOVE THIS TO ITS CORRECT LOCATION
+//
+[argeo:note] > mix:title, mix:versionable, mix:created, mix:lastModified
+mixin
+
+
+//
+// TEMPLATES AND ENVIRONMENTS
+//
+
+// Abstract description of whole or part of an IT environment
+[akb:envTemplate] > nt:unstructured
+
+// An environment template (1..1 relationship) applied to a real environment
+[akb:env] > nt:unstructured
+
+
+//
+// CONNECTORS
+//
+
+// GENERIC TYPE FOR A CONNECTOR
+[akb:connector] > nt:unstructured, mix:title
+- akb:connectorUrl (STRING)
+// add argeo keyring
+
+
+//
+// GENERIC ITEM
+//
+[akb:item] > nt:unstructured
+
+//
+// GENERIC ITEM FOLDER
+//
+[akb:itemsFolder] > nt:unstructured
++ * (akb:item) *
+
+//
+// SSH FILE
+//
+[akb:sshFile] > akb:item
+
+//
+// SSH COMMAND
+//
+[akb:sshCommand] > akb:item
+
+//
+// JDBC QUERY
+//
+[akb:jdbcQuery] > akb:item
+
+
+//
+// NOTE
+//
+[akb:note] > akb:item, argeo:note
+