Ignore:
Timestamp:
Nov 20, 2012, 5:23:52 PM (11 years ago)
Author:
casties
Branch:
default
Message:

made uri prefixes in store configurable.

File:
1 edited

Legend:

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

    r57 r58  
    7979     * run in authorization mode i.e. with tokens.
    8080     */
    81     protected boolean authorizationMode = false; 
     81    protected boolean authorizationMode = false;
    8282    public static final String AUTHORIZATION_MODE_KEY = "annotationmanager.authorization";
    8383   
     84    /**
     85     * prefix to create uris for tags in store.
     86     */
     87    public static String TAGS_URI_PREFIX = "";
     88    public static final String TAGS_URI_KEY = "annotationmanager.uris.tags";
     89
     90    /**
     91     * prefix to create uris for persons in store.
     92     */
     93    public static String PERSONS_URI_PREFIX = "";
     94    public static final String PERSONS_URI_KEY = "annotationmanager.uris.persons";
     95
     96    /**
     97     * prefix to create uris for groups in store.
     98     */
     99    public static String GROUPS_URI_PREFIX = "";
     100    public static final String GROUPS_URI_KEY = "annotationmanager.uris.groups";
     101
    84102    /**
    85103     * constructor
     
    185203                sc.setAttribute(CONSUMERKEYS_KEY, consumerKeys);
    186204            }
     205            /*
     206             * read uri prefixes
     207             */
     208            String pup = (String) sc.getAttribute(PERSONS_URI_KEY);
     209            if (pup != null) {
     210                BaseRestlet.PERSONS_URI_PREFIX = pup;
     211            }
     212            String gup = (String) sc.getAttribute(GROUPS_URI_KEY);
     213            if (gup != null) {
     214                BaseRestlet.GROUPS_URI_PREFIX = gup;
     215            }
     216            String tup = (String) sc.getAttribute(TAGS_URI_KEY);
     217            if (tup != null) {
     218                BaseRestlet.TAGS_URI_PREFIX = tup;
     219            }
    187220        } else {
    188221            logger.error("Unable to get ServletContext!");
Note: See TracChangeset for help on using the changeset viewer.