Package org.apache.sling.ide.transport

Examples of org.apache.sling.ide.transport.Repository


            if (field.getPropertyName().equals("jcr:primaryType")) {
                editor = new TextCellEditor(tableViewer.getTable()) {
                    @Override
                    protected Control createControl(Composite parent) {
                        Text text = (Text) super.createControl(parent);
                        Repository repository = ServerUtil.getDefaultRepository(getNode().getProject());
                        NodeTypeRegistry ntManager = (repository==null) ? null : repository.getNodeTypeRegistry();
                        if (ntManager == null) {
                            return text;
                        }
                        try {
                            Collection<String> types = ntManager.getAllowedPrimaryChildNodeTypes(getNode().getParent().getPrimaryType());
View Full Code Here


        if (!node.canCreateChild()) {
            MessageDialog.openInformation(shell, "Cannot create node",
                    "Node is not covered by the workspace filter as defined in filter.xml");
            return;
        }
        Repository repository = ServerUtil.getDefaultRepository(node.getProject());
        NodeTypeRegistry ntManager = (repository==null) ? null : repository.getNodeTypeRegistry();
        if (ntManager == null) {
           
            if (!doNotAskAgain) {
                MessageDialog dialog = new MessageDialog(null,  "Unable to validate node type", null,
                        "Unable to validate node types since project " + node.getProject().getName() + " is not associated with a server or the server is not started.",
View Full Code Here

                debuggerConnection = new JVMDebuggerConnection();
                success = debuggerConnection.connectInDebugMode(launch, getServer(), monitor);

            } else {

                Repository repository;
                try {
                    repository = ServerUtil.connectRepository(getServer(), monitor);
                } catch (CoreException e) {
                    setServerState(IServer.STATE_STOPPED);
                    throw e;
                }
               
                monitor.worked(2); // 2/5 done
               
                Command<ResourceProxy> command = repository.newListChildrenNodeCommand("/");
                result = command.execute();
                success = result.isSuccess();
               
                monitor.worked(1); // 3/5 done
               
View Full Code Here

    private void publishContentModule(int kind, int deltaKind, IModule[] module, IProgressMonitor monitor)
            throws CoreException, SerializationException, IOException {

        Logger logger = Activator.getDefault().getPluginLogger();

    Repository repository = ServerUtil.getConnectedRepository(getServer(), monitor);
       
        // TODO it would be more efficient to have a module -> filter mapping
        // it would be simpler to implement this in SlingContentModuleAdapter, but
        // the behaviour for resources being filtered out is deletion, and that
        // would be an incorrect ( or at least suprising ) behaviour at development time
View Full Code Here

    return resource;
  }
 
  private SerializationKind getSerializationKind(String nodeType) {
        final SerializationKindManager skm = new SerializationKindManager();
        final Repository repo = ServerUtil.getDefaultRepository(getProject());
        if (repo==null) {
            return getFallbackSerializationKind(nodeType);
        }
        try {
            skm.init(repo);
View Full Code Here

    public void setPropertyValue(Object key, Object value) {
        properties.setPropertyValue(key, value);
    }

    void changePrimaryType(String newPrimaryType) {
        Repository repository = ServerUtil.getDefaultRepository(getProject());
        NodeTypeRegistry ntManager = (repository==null) ? null : repository.getNodeTypeRegistry();
        if (ntManager == null) {
            MessageDialog.openWarning(null, "Unable to change primary type", "Unable to change primary type since project "
                    + getProject().getName() + " is not associated with a server or the server is not started.");
            return;
        }
View Full Code Here

    public void addProperty(String name, String value) {
        properties.addProperty(name, value);
    }

    public NodeType getNodeType() {
        Repository repository = ServerUtil.getDefaultRepository(getProject());
        NodeTypeRegistry ntManager = (repository==null) ? null : repository.getNodeTypeRegistry();
        if (ntManager==null) {
            return null;
        }
        return ntManager.getNodeType(getPrimaryType());
    }
View Full Code Here

       
        return folder;
    }

    public IStatus validateDrop(int operation, TransferData transferType) {
        Repository repository = ServerUtil.getDefaultRepository(getProject());
        NodeTypeRegistry ntManager = (repository==null) ? null : repository.getNodeTypeRegistry();
        if (ntManager == null) {
            return new Status(IStatus.CANCEL, Activator.PLUGIN_ID, 1, "Cannot drop element here because corresponding server is not started! (Needed to determine node types)", null);
        }
        // let's support plain files first
        try {
View Full Code Here

                    new Transfer[] { ResourceTransfer.getInstance() });
        }
    }

    public boolean canBePastedTo(Clipboard clipboard) {
        Repository repository = ServerUtil.getDefaultRepository(getProject());
        NodeTypeRegistry ntManager = (repository==null) ? null : repository.getNodeTypeRegistry();
       
        IResource[] resourceData = (IResource[]) clipboard
                .getContents(ResourceTransfer.getInstance());
        if (resourceData!=null) {
            IContainer container = getDropContainer();
View Full Code Here

            // corresponding action - checking here nevertheless
            MessageDialog.openInformation(null, "Cannot paste",
                    "No applicable node (type) for pasting found.");
            return;
        }
        Repository repository = ServerUtil.getDefaultRepository(getProject());
        NodeTypeRegistry ntManager = (repository==null) ? null : repository.getNodeTypeRegistry();
        if (ntManager == null) {
            MessageDialog.openWarning(null, "Cannot paste", "Cannot paste if corresponding server is not started");
            return;
        }
       
View Full Code Here

TOP

Related Classes of org.apache.sling.ide.transport.Repository

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.