Package com.ibm.sbt.services.endpoints

Examples of com.ibm.sbt.services.endpoints.Endpoint


                    params.put("file", filename);

                    if (null != file) {
                        File serverFile = file.getServerFile();
                        if (null != serverFile) {
                            Endpoint endpoint = ((FileServiceAccessor)accessor).findEndpointBean();
                            IFileType ift = (IFileType) ((FileServiceAccessor)accessor).findService();
                            try {
                                ift.uploadFile(endpoint, serverFile, this, params);
                                refresh();
                            } catch (CloneNotSupportedException e) {
                                throw new FacesExceptionEx(e, "Failed to upload file to {0}", endpoint.getLabel());
                            }
                        }
                    }
                }
            }
View Full Code Here


        @Override
        protected Block loadBlock(int index, int blockSize) {
            String urlForLog = null;
            String fileServiceName = null;
            try {
                Endpoint provider = findEndpointBean();
                IFileType fileService = findService();
                if (fileService == null) {
                    throw new FacesExceptionEx(null, "The file service type is not assigned (null)");
                }
View Full Code Here

         *
         * @see com.ibm.xsp.extlib.model.DataAccessor#deleteRow(java.lang.String)
         */
        @Override
        public void deleteRow(String rowId) {
            Endpoint authBean = findEndpointBean();
            IFileType ift = (IFileType) findService();
            ift.deleteRow(this, authBean, rowId);
        }
View Full Code Here

            IFileType ift = (IFileType) findService();
            ift.deleteRow(this, authBean, rowId);
        }

        public void createFolder(String folderName) throws UnsupportedEncodingException, IOException {
            Endpoint authBean = findEndpointBean();
            IFileType ift = (IFileType) findService();
            ift.createFolder(authBean, folderName);
        }
View Full Code Here

        try {
            String endpointName = request.getParameter(PARAM_ENDPOINT_NAME);
            if(StringUtil.isEmpty(endpointName)){
                endpointName = TYPE;
            }
            Endpoint bean = EndpointFactory.getEndpoint(endpointName);

            if (bean == null) {
                throw new ServletException("AuthorizationBean not found in application scope");
            }
View Full Code Here

     * @see com.ibm.xsp.extlib.sbt.files.type.AbstractType#getServiceUrl(com.ibm.xsp.extlib.sbt.files.FileServiceData.FileServiceAccessor)
     */
    @Override
    public String getServiceUrl() {
        if(accessor != null){
            Endpoint ep = accessor.findEndpointBean();
            String v = getDropBoxApiVersion(ep);
            String[] split = SVC_URL_1.split("/");
            StringBuffer buffer = new StringBuffer(v + "/");
            for(int i = 1; i < split.length; i++){
                buffer.append(split[i] + "/");
View Full Code Here

        try {
            String endpointName = request.getParameter(PARAM_ENDPOINT_NAME);
            if (StringUtil.isEmpty(endpointName)) {
                endpointName = TYPE;
            }
            Endpoint bean = (Endpoint) ManagedBeanUtil.getBean(FacesContext.getCurrentInstance(), endpointName);

            if (bean == null) {
                throw new ServletException("AuthorizationBean not found in application scope");
            }
View Full Code Here

    private void authenticate(RestDataBlockAccessor accessor) throws ClientServicesException {
        String endpoint = accessor.getEndpoint();
        if (StringUtil.isEmpty(endpoint)) {
            endpoint = EndpointFactory.SERVER_SMARTCLOUD;
        }
        Endpoint ep = EndpointFactory.getEndpoint(endpoint);
        if (ep != null) {
            if (!ep.isAuthenticated()) {
                ep.authenticate(false);
            }
        }
    }
View Full Code Here

        try {
            String endpoint = request.getParameter(PARAM_ENDPOINT_NAME);
            if (StringUtil.isEmpty(endpoint)) {
                endpoint = TYPE;
            }
            Endpoint bean = (Endpoint) ManagedBeanUtil.getBean(FacesContext.getCurrentInstance(), endpoint);

            if (bean == null) {
                throw new ServletException("AuthorizationBean not found");
            }
            if (!bean.isAuthenticated()) {
                bean.authenticate(false);
            }

            String fileId = request.getParameter(PARAM_ID);
            String repositoryId = request.getParameter(PARAM_REPOSITORY_ID);
            String href = "/" + repositoryId + "/object/snx:file!" + fileId + "/stream/" + fileId;
View Full Code Here

        // Find the Connections Endpoint
        String endpointName = ctClient.getEndpoint();
        if(StringUtil.isEmpty(endpointName)) {
            endpointName = EndpointFactory.SERVER_CONNECTIONS;
        }
        Endpoint ctServer = EndpointFactory.getEndpointUnchecked(endpointName);
        if(ctServer==null) {
            //Platform.getInstance().log("Sametime server URL is undefined.");
            return;
        }
View Full Code Here

TOP

Related Classes of com.ibm.sbt.services.endpoints.Endpoint

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.