-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring of uxloader app to a point where it works. Not configurab…
…le yet, though. Maps /tmp/dev to /dev and /tmp/devwidgets to /devwidgets
- Loading branch information
1 parent
5c0d95b
commit e012c84
Showing
5 changed files
with
212 additions
and
199 deletions.
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
32 changes: 32 additions & 0 deletions
32
...l/bundles/uxloader/src/main/java/org/sakaiproject/kernel2/uxloader/ActivationProcess.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,32 @@ | ||
package org.sakaiproject.kernel2.uxloader; | ||
|
||
import java.io.File; | ||
import java.util.Dictionary; | ||
import java.util.Hashtable; | ||
|
||
import javax.servlet.ServletException; | ||
|
||
import org.osgi.service.http.HttpContext; | ||
import org.osgi.service.http.HttpService; | ||
import org.osgi.service.http.NamespaceException; | ||
import org.sakaiproject.kernel.api.memory.CacheManagerService; | ||
|
||
public class ActivationProcess { | ||
private HttpService http; | ||
private HttpContext context; | ||
private CacheManagerService cache; | ||
|
||
public ActivationProcess(HttpService http,CacheManagerService cache) { | ||
this.http=http; | ||
this.context=http.createDefaultHttpContext(); | ||
this.cache=cache; | ||
} | ||
|
||
public void map(String url,String filesystem) throws ServletException, NamespaceException { | ||
Dictionary<String, String> uxLoaderParams = new Hashtable<String, String>(); | ||
uxLoaderParams.put(FileServlet.BASE_FILE,filesystem); | ||
uxLoaderParams.put(FileServlet.MAX_CACHE_SIZE, "102400"); | ||
uxLoaderParams.put(FileServlet.WELCOME_FILE, "index.html"); | ||
http.registerServlet(url, new FileServlet(cache),uxLoaderParams,context); | ||
} | ||
} |
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
Oops, something went wrong.