Examples of GWTJahiaNode


Examples of org.jahia.ajax.gwt.client.data.node.GWTJahiaNode

* Time: 6:56:52 PM
*
*/
public class WebfolderActionItem extends BaseActionItem {
    public void onComponentSelection() {
        final GWTJahiaNode selection = linker.getSelectionContext().getSingleSelection();
        if (selection != null && !selection.isFile()) {
            linker.loading(Messages.get("statusbar.webfoldering.label"));
            JahiaContentManagementService
                    .App.getInstance().getAbsolutePath(selection.getPath(), new BaseAsyncCallback<String>() {
                public void onApplicationFailure(Throwable t) {
                    Window.alert(Messages.get("failure.webfolder.label") + "\n" + t.getLocalizedMessage());
                    linker.loaded();
                }

                public void onSuccess(String url) {
                    if (url != null) {
                        HTML link = new HTML(Messages.get("webFolderMessage.label") + "<br /><br /><a target=\"_new\" folder=\"" + url + "\" style=\"behavior:url(#default#AnchorClick)\">" + selection.getName() + "</a>");
                        final Dialog dl = new Dialog();
                        dl.setModal(true);
                        dl.setHeading(Messages.get("label.openIEFolder"));
                        dl.setHideOnButtonClick(true);
                        dl.setLayout(new FlowLayout());
View Full Code Here

Examples of org.jahia.ajax.gwt.client.data.node.GWTJahiaNode

    }


    public void handleNewLinkerSelection() {
        LinkerSelectionContext lh = linker.getSelectionContext();
        GWTJahiaNode singleSelection = lh.getSingleSelection();
        setEnabled(singleSelection!=null
                && singleSelection.isLockable()
                && !lh.isLocked()
                && PermissionsUtils.isPermitted("jcr:lockManagement", lh.getSelectionPermissions())
                && singleSelection.canLock() && !lh.isSecondarySelection());
    }
View Full Code Here

Examples of org.jahia.ajax.gwt.client.data.node.GWTJahiaNode

* Date: Sep 25, 2009
* Time: 6:58:58 PM
*/
public class UnpublishActionItem extends BaseActionItem {
    public void onComponentSelection() {
        final GWTJahiaNode selectedNode = linker.getSelectionContext().getSingleSelection();
        if (selectedNode != null) {
            linker.loading(Messages.get("label.content.unpublishing", "Unpublishing"));
            GWTJahiaWorkflowInfo workflowInfo = selectedNode.getWorkflowInfo();
            if (workflowInfo != null) {
                final GWTJahiaWorkflowDefinition workflowDefinition = workflowInfo.getPossibleWorkflows().get(
                        new GWTJahiaWorkflowType("unpublish"));

                final List<String> uuids = new ArrayList<String>();
                List<GWTJahiaNode> jahiaNodes = linker.getSelectionContext().getMultipleSelection();
                if (jahiaNodes.size() > 1) {
                    for (GWTJahiaNode jahiaNode : jahiaNodes) {
                        uuids.add(jahiaNode.getUUID());
                    }
                } else {
                    uuids.add(selectedNode.getUUID());
                }
                linker.loading(Messages.get("label.gettingPublicationInfo", "Getting publication information"));
                JahiaContentManagementService.App.getInstance().getPublicationInfo(uuids, true, true, new BaseAsyncCallback<List<GWTJahiaPublicationInfo>>() {
                            public void onSuccess(List<GWTJahiaPublicationInfo> result) {
                                linker.loaded();
                                EngineContainer container;
                                if (linker instanceof ManagerLinker) {
                                    container = new EngineWindow();
                                } else {
                                    container = new EnginePanel();
                                }
                                EngineContainer cards = new EngineCards(container, linker);
                                new WorkflowActionDialog(selectedNode.getPath(), Messages.getWithArgs("label.workflow.start.message",
                                        "{0} started by {1} on {2} - {3} content items involved",
                                        new Object[]{workflowDefinition.getDisplayName(),JahiaGWTParameters.getCurrentUser(), DateTimeFormat.getFormat(
                                                DateTimeFormat.PredefinedFormat.DATE_TIME_SHORT).format(new Date()),result.size()})
                                         , workflowDefinition, linker,
                                        new UnpublicationWorkflow(result), cards);
                                cards.showEngine();
                            }

                            public void onApplicationFailure(Throwable caught) {
                                linker.loaded();
                                Window.alert("Cannot get status: " + caught.getMessage());
                            }
                        });


            } else {
                JahiaContentManagementService.App.getInstance().unpublish(Arrays.asList(selectedNode.getUUID()),
                        new BaseAsyncCallback<Object>() {
                            public void onApplicationFailure(Throwable caught) {
                                linker.loaded();
                                Log.error("Cannot publish", caught);
                                com.google.gwt.user.client.Window.alert("Cannot unpublish " + caught.getMessage());
View Full Code Here

Examples of org.jahia.ajax.gwt.client.data.node.GWTJahiaNode

                linker);    //To change body of overridden methods use File | Settings | File Templates.
        setEnabled(false);
    }

    public void handleNewLinkerSelection() {
        GWTJahiaNode gwtJahiaNode = linker.getSelectionContext().getSingleSelection();
        if (gwtJahiaNode != null && gwtJahiaNode.getAggregatedPublicationInfos() != null) {
            GWTJahiaPublicationInfo info = gwtJahiaNode.getAggregatedPublicationInfo();
            setEnabled(!info.isLocked() && info.isCanPublish() &&
                       (info.getStatus() == GWTJahiaPublicationInfo.PUBLISHED ||
                        info.getStatus() == GWTJahiaPublicationInfo.MODIFIED));
            updateTitle(getGwtToolbarItem().getTitle() + " " + gwtJahiaNode.getDisplayName() + " - " +
                        JahiaGWTParameters.getLanguageDisplayName());
        } else {
            setEnabled(false);
        }
    }
View Full Code Here

Examples of org.jahia.ajax.gwt.client.data.node.GWTJahiaNode

        mainComponent.getStore().sort("displayName", Style.SortDir.ASC);

        mainComponent.addSelectionChangedListener(new SelectionChangedListener<GWTJahiaNode>() {
            @Override
            public void selectionChanged(SelectionChangedEvent<GWTJahiaNode> event) {
                final GWTJahiaNode jahiaNode = event.getSelection().get(0);
                if (jahiaNode.get("j:languages") != null && !((List<String>)jahiaNode.get("j:languages")).contains(JahiaGWTParameters.getLanguage())) {
                    ((EditLinker) linker).setLocale((GWTJahiaLanguage) jahiaNode.get(GWTJahiaNode.DEFAULT_LANGUAGE));
                }
                JahiaGWTParameters.setSite(jahiaNode, linker);
                ((EditLinker) linker).getSidePanel().refresh(EditLinker.REFRESH_ALL);
                if (root.get(0).startsWith("/templateSets")) {
                    ((EditLinker) linker).onMainSelection(jahiaNode.getPath(), null, null);
                } else {
                    ((EditLinker) linker).onMainSelection((String) jahiaNode.get(GWTJahiaNode.HOMEPAGE_PATH), null, null);
                }
            }
        });
    }
View Full Code Here

Examples of org.jahia.ajax.gwt.client.data.node.GWTJahiaNode

    }


    public void handleNewLinkerSelection() {
        LinkerSelectionContext lh = linker.getSelectionContext();
        GWTJahiaNode singleSelection = lh.getSingleSelection();
        setEnabled(singleSelection!=null && singleSelection.isLockable() &&
                PermissionsUtils.isPermitted("jcr:lockManagement", lh.getSelectionPermissions()) && singleSelection.getLockInfos() != null &&
                singleSelection.canUnlock() && !lh.isSecondarySelection());
    }
View Full Code Here

Examples of org.jahia.ajax.gwt.client.data.node.GWTJahiaNode

* Time: 6:58:56 PM
*
*/
public class ReversePublishActionItem extends BaseActionItem implements IsSerializable {
    public void onComponentSelection() {
        GWTJahiaNode selectedNode = linker.getSelectionContext().getSingleSelection();

        if (selectedNode != null) {

//            JahiaContentManagementService.App.getInstance().publish(Arrays.asList(selectedNode.getUUID()), false, "", false, true, new BaseAsyncCallback() {
//                public void onApplicationFailure(Throwable caught) {
View Full Code Here

Examples of org.jahia.ajax.gwt.client.data.node.GWTJahiaNode

        super.init(gwtToolbarItem, linker);    //To change body of overridden methods use File | Settings | File Templates.
        setEnabled(false);
    }

    public void handleNewLinkerSelection() {
        GWTJahiaNode gwtJahiaNode = linker.getSelectionContext().getSingleSelection();

        if (gwtJahiaNode != null) {
            GWTJahiaPublicationInfo info = gwtJahiaNode.getAggregatedPublicationInfo();
//            setEnabled(info.getStatus() == GWTJahiaPublicationInfo.LIVE_MODIFIED || info.getSubnodesStatus().contains(GWTJahiaPublicationInfo.LIVE_MODIFIED));
            setEnabled(true);
            updateTitle(getGwtToolbarItem().getTitle() + " " + gwtJahiaNode.getName());
        }
    }
View Full Code Here

Examples of org.jahia.ajax.gwt.client.data.node.GWTJahiaNode

        nodes.add((GWTJahiaNode) grid.getSelectionModel().getSelectedItem());
        e.setData(nodes);
        List<GWTJahiaNode> list = new ArrayList<GWTJahiaNode>(1);
        List<ModelData> l = grid.getSelectionModel().getSelectedItems();
        for (ModelData modelData : l) {
            GWTJahiaNode node = (GWTJahiaNode) modelData;
            if(node.getReferencedNode()!=null) {
                node = node.getReferencedNode();
            }
            list.add(node);
        }
        e.getStatus().setData("size", list.size());
        e.getStatus().setData(EditModeDNDListener.SOURCE_NODES, list);
View Full Code Here

Examples of org.jahia.ajax.gwt.client.data.node.GWTJahiaNode

    }

    @Override
    protected void onDragEnter(DNDEvent e) {
        Module parentModule = module.getParentModule();
        final GWTJahiaNode jahiaNode = parentModule.getNode();
        if (PermissionsUtils.isPermitted("jcr:addChildNodes", jahiaNode) && !jahiaNode.isLocked()) {

            String nodetypes = parentModule.getNodeTypes();
            int listLimit = parentModule.getListLimit();
            if (EditModeDNDListener.EMPTYAREA_TYPE.equals(targetType)) {
                nodetypes = module.getNodeTypes();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.