Package org.jayasoft.woj.common.model.content

Examples of org.jayasoft.woj.common.model.content.ContentReference


public class DispatchServlet extends SecuredServlet {
    private final static Logger LOGGER = LoggingManager.getLogger(DispatchServlet.class.getName());

    protected void doSecuredPost(UAK uak, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        boolean redirected = ResponseHelper.isRedirected(request);
        ContentReference cref = WOJServer.getInstance().getDispatchService().getContentReference(uak, ResponseHelper.getRequestedUrl(request), redirected);
        if (CommonSecurityHelper.BROWSER.equals(uak.getComputerId()) && cref.getReferencePath().endsWith(".java")) {
            response.setContentType(MimeType.HTML);
        } else {
            response.setContentType(WOJServer.getInstance().getContentService().getMimeType(cref));
        }
        WOJServer.getInstance().getContentService().serve(uak, ServletHelper.getLazyOutputStream(response), cref, WOJServer.getInstance().getDispatchService(), redirected);
View Full Code Here


        super(Commands.GET_SOURCE.NAME);
    }

    public Object securedInvoke(UAK uak, Map m) throws IOException {
        boolean redirected = CommandUtil.getBooleanFromParamKey(m, "redirected").booleanValue();
        ContentReference ref = WOJServer.getInstance().getDispatchService().getContentReference(
                uak,
                CommandUtil.getStringFromParamKey(m, Commands.GET_SOURCE.P_VISIBILITY),
                CommandUtil.getStringFromParamKey(m, Commands.GET_SOURCE.P_MOD_ORG),
                CommandUtil.getStringFromParamKey(m, Commands.GET_SOURCE.P_MOD_NAME),
                CommandUtil.getStringFromParamKey(m, Commands.GET_SOURCE.P_MOD_REV),
View Full Code Here

TOP

Related Classes of org.jayasoft.woj.common.model.content.ContentReference

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.