Ignore:
Timestamp:
Jul 11, 2012, 3:08:40 PM (12 years ago)
Author:
casties
Branch:
default
Message:

delete annotation should work now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/de/mpiwg/itgroup/annotations/restlet/RestServer.java

    r5 r6  
    5454    private AnnotationStore store;
    5555    public static final String ANNSTORE_KEY = "annotationmanager.store";
     56
     57    private String ldapServerUrl;
     58    public static final String LDAP_SERVER_KEY = "annotationmanager.ldapserver.url";
    5659
    5760    /**
     
    8184                     */
    8285                    graphdbPath = serverConfig.getProperty(GRAPHDB_PATH_KEY, graphdbPath);
     86                    ldapServerUrl =  serverConfig.getProperty(LDAP_SERVER_KEY, null);
    8387                } catch (IOException e) {
    8488                    logger.warn("Error loading server config: ", e);
     
    182186        String retString = creator; // falls nichts gefunden wird einfach den
    183187                                    // creator zurueckgeben
     188        if (ldapServerUrl == null) {
     189                return retString;
     190        }
    184191        Hashtable<String, String> env = new Hashtable<String, String>();
    185192        String sp = "com.sun.jndi.ldap.LdapCtxFactory";
    186193        env.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, sp);
    187194
    188         // TODO: should go into config file
    189         String ldapUrl = "ldap://ldap.mpiwg-berlin.mpg.de/dc=mpiwg-berlin,dc=mpg,dc=de";
    190         env.put(javax.naming.Context.PROVIDER_URL, ldapUrl);
     195        env.put(javax.naming.Context.PROVIDER_URL, ldapServerUrl);
    191196
    192197        DirContext dctx;
Note: See TracChangeset for help on using the changeset viewer.