Package org.exoplatform.portal.mop

Examples of org.exoplatform.portal.mop.SiteKey


    public static class EditNavigationActionListener extends BaseEditAction {
        @Override
        protected void doEdit(UserNavigation nav, Event<UIGroupNavigationManagement> event) throws Exception {
            UserPortal userPortal = Util.getPortalRequestContext().getUserPortalConfig().getUserPortal();
            UIGroupNavigationManagement uicomp = event.getSource();
            SiteKey siteKey = nav.getKey();

            UIPopupWindow popUp = uicomp.getChild(UIPopupWindow.class);
            UINavigationManagement naviManager = popUp.createUIComponent(UINavigationManagement.class, null, null, popUp);
            uicomp.naviManager = naviManager;
View Full Code Here


    public static class EditPropertiesActionListener extends BaseEditAction {
        @Override
        protected void doEdit(UserNavigation navigation, Event<UIGroupNavigationManagement> event) throws Exception {
            UIGroupNavigationManagement uicomp = event.getSource();
            SiteKey siteKey = navigation.getKey();

            // open a add navigation popup
            UIPopupWindow popUp = uicomp.getChild(UIPopupWindow.class);
            UIPageNavigationForm pageNavigation = popUp.createUIComponent(UIPageNavigationForm.class, null, null, popUp);
            pageNavigation.setOwnerId(siteKey.getName());
            pageNavigation.setOwnerType(siteKey.getTypeName());
            pageNavigation.setPriority(String.valueOf(navigation.getPriority()));
            pageNavigation.addFormInput();
            pageNavigation.setUserNav(navigation);
            popUp.setUIComponent(pageNavigation);
            popUp.setWindowSize(600, 400);
View Full Code Here

            UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
            prContext.addUIComponentToUpdateByAjax(uiWorkingWS);
            prContext.setFullRender(true);

            UserNavigation navigation = uiNodeSelector.getEdittedNavigation();
            SiteKey siteKey = navigation.getKey();
            String editedOwnerId = siteKey.getName();

            // Check existed
            UserPortalConfig userPortalConfig;
            if (SiteType.PORTAL.equals(siteKey.getType())) {
                userPortalConfig = portalConfigService.getUserPortalConfig(editedOwnerId, event.getRequestContext()
                        .getRemoteUser());
                if (userPortalConfig == null) {
                    prContext.getUIApplication().addMessage(
                            new ApplicationMessage("UIPortalForm.msg.notExistAnymore", null, ApplicationMessage.ERROR));
View Full Code Here

    @Override
    public boolean execute(ControllerContext context) throws Exception {
        String requestSiteName = context.getParameter(PortalRequestHandler.REQUEST_SITE_NAME);
        String requestPath = context.getParameter(PortalRequestHandler.REQUEST_PATH);

        SiteKey siteKey = SiteKey.portal(requestSiteName);
        String uri = requestPath;

        // Resolve the user node if node path is indicated
        if (!requestPath.equals("")) {
            UserPortalConfig cfg = userPortalService.getUserPortalConfig(requestSiteName, context.getRequest().getRemoteUser(),
                    userPortalContext);
            if (cfg != null) {
                UserPortal userPortal = cfg.getUserPortal();
                UserNodeFilterConfig.Builder builder = UserNodeFilterConfig.builder().withAuthMode(
                        UserNodeFilterConfig.AUTH_READ);
                UserNode userNode = userPortal.resolvePath(builder.build(), requestPath);

                if (userNode != null) {
                    siteKey = userNode.getNavigation().getKey();
                    uri = userNode.getURI();
                }
            }
        }

        //
        PortalURLContext urlContext = new PortalURLContext(context, siteKey);
        NodeURL url = urlFactory.newURL(NodeURL.TYPE, urlContext);

        url.setResource(new NavigationResource(siteKey.getType(), siteKey.getName(), uri));
        url.setMimeType(MimeType.PLAIN);

        HttpServletRequest request = context.getRequest();
        Enumeration paraNames = request.getParameterNames();
        while (paraNames.hasMoreElements()) {
View Full Code Here

     */
    public UIPortal getCachedUIPortal(String ownerType, String ownerId) {
        if (ownerType == null || ownerId == null) {
            return null;
        }
        return this.all_UIPortals.get(new SiteKey(ownerType, ownerId));
    }
View Full Code Here

     * Associates the specified UIPortal to a cache map with specified key which bases on OwnerType and OwnerId
     *
     * @param uiPortal
     */
    public void putCachedUIPortal(UIPortal uiPortal) {
        SiteKey siteKey = uiPortal.getSiteKey();

        if (siteKey != null) {
            this.all_UIPortals.put(siteKey, uiPortal);
        }
    }
View Full Code Here

     */
    public void removeCachedUIPortal(String ownerType, String ownerId) {
        if (ownerType == null || ownerId == null) {
            return;
        }
        this.all_UIPortals.remove(new SiteKey(ownerType, ownerId));
    }
View Full Code Here

            js.append("eXo.env.server.portalURLTemplate=\"");
            js.append(url).append("\";");

            pcontext.getJavascriptManager().require("SHARED/base").addScripts(js.toString());

            SiteKey siteKey = new SiteKey(pcontext.getSiteType(), pcontext.getSiteName());
            PageNodeEvent<UIPortalApplication> pnevent = new PageNodeEvent<UIPortalApplication>(this,
                    PageNodeEvent.CHANGE_NODE, siteKey, pcontext.getNodePath());
            broadcast(pnevent, Event.Phase.PROCESS);
        }
View Full Code Here

         *
         * int colonIndex = pathInfo.indexOf("/", 1); if (colonIndex < 0) { colonIndex = pathInfo.length(); } portalOwner_ =
         * pathInfo.substring(1, colonIndex); nodePath_ = pathInfo.substring(colonIndex, pathInfo.length());
         */
        //
        this.siteKey = new SiteKey(SiteType.valueOf(requestSiteType.toUpperCase()), requestSiteName);
        this.nodePath_ = requestPath;
        this.requestLocale = requestLocale;

        //
        NodeURL url = createURL(NodeURL.TYPE);
View Full Code Here

        PortalRequest.setInstance(null);
    }

    public class RequestContextURIResolver implements org.gatein.api.common.URIResolver {
        public String resolveURI(SiteId siteId) {
            SiteKey siteKey = Util.from(siteId);
            NavigationResource navResource = new NavigationResource(siteKey, "");
            NodeURL nodeURL = context.createURL(NodeURL.TYPE, navResource);
            String n = nodeURL.toString();
            return n.substring(0, n.length() - 1);
        }
View Full Code Here

TOP

Related Classes of org.exoplatform.portal.mop.SiteKey

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.