<%-- Created by IntelliJ IDEA. User: ncsa Date: Aug 7, 2010 Time: 9:14:32 AM To change this template use File | Settings | File Templates. --%> <%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ page import="org.cilogon.portal.servlets.ConfigConstants" %> <%@ page import="static org.cilogon.portal.config.PortalVocabulary.*" %> <% FileStoreModel fileStoreModel = null; String dataPath = null; String indexPath = null; boolean createFileStore = true; say("starting file store setup"); StoreModel storeModel1 = root.getStore(); if (storeModel1 != null) { // FIXME. Better logic in case the user changes his or her mind about the store type. So there might be some other store here to replace. if (!storeModel1.isA(FILE_STORE_TYPE)) { root.removeStore(storeModel1); createFileStore = true; } else { fileStoreModel = (FileStoreModel) portalConfiguration.getMyThingSession().fetchThing(root.getStore().getSubject(), FileStoreModel.class); createFileStore = false; } } if (createFileStore) { say("creatin new store"); fileStoreModel = portalConfiguration.createFileStore(application.getRealPath(CONFIG_FILE_PATH + TEMP_DIRECTORY_NAME)); root.setStore(fileStoreModel); // we will set the defaults here } saveConfig(application, portalConfiguration); dataPath = fileStoreModel.getDataPath(); indexPath = fileStoreModel.getLookup(); %> File store setup

Configuring the file store.

This requires two paths. The first is a directory where transactions will be stored and the second is for indices. The defaults will place these in the current WEB-INF directory, which should be sufficient for most cases.
Note: If the paths do not exist, they will be created as needed. Be sure you have proper permissions for any directories you list

Data directory: />
Index directory: />
value="<%= ConfigConstants.FILE_STORE_SETUP %>" />