Package org.wso2.carbon.registry.core

Examples of org.wso2.carbon.registry.core.ResourceImpl.discard()


                                      String path, String description) throws Exception {

        Resource resource = registry.get(path);
        resource.setDescription(description);
        registry.put(path, resource);
        resource.discard();
    }
}
View Full Code Here


                String[] filteredChildArr = filteredChilds.toArray(new String[filteredChilds.size()]);
                bean.setChildren(filteredChildArr);
            } else {
                bean.setCollection(false);
            }
            resource.discard();

        } catch (RegistryException e) {

            String msg = "Failed to get the resource information of resource " + resourcePath +
                    " for constructing the resource tree entry. " +
View Full Code Here

                resource.setMediaType(mediaType);
                resource.setDescription(description);
            }
            resource.setContent(contentText.getBytes());
            registry.put(path, resource);
            resource.discard();

        } catch (RegistryException e) {

            String msg = "Could not update the content of the resource " +
                    path + ". Caused by: " + ((e.getCause() instanceof SQLException) ?
View Full Code Here

                //*****************************//
                long putEnd = System.nanoTime();
                long putTime = putEnd - putStart;
                System.out.println("CSV," + threadName + "," + "put," + putTime / 1000000);
                //System.out.println("~~~~~end put~~~~~");
                r1.discard();

                long queryStart = System.nanoTime();
                //*****************************//
                Map params = new HashMap();
                params.put("1", "%production%");
View Full Code Here

    Calendar createdDateTime = Calendar.getInstance();
    createdDateTime.setTime(child.getCreatedTime());
    resourceData.setCreatedOn(createdDateTime);
    CommonUtil.populateAverageStars(resourceData);

    child.discard();

    return resourceData;
  }

  public static String getLoggedInUserName(){
View Full Code Here

                    Calendar createdDateTime = Calendar.getInstance();
                    createdDateTime.setTime(child.getCreatedTime());
                    resourceData.setCreatedOn(createdDateTime);
                    CommonUtil.populateAverageStars(resourceData);

                    child.discard();

                    resourceDataList [i] = resourceData;

                } catch (AuthorizationFailedException e) {
                    // do not show unauthorized resource in search results.
View Full Code Here

                    }
                    resourceData.setTagCounts(tagCounts);
                   
                    CommonUtil.populateAverageStars(resourceData);

                    child.discard();

                    resourceDataList[i] = resourceData;

                } catch (AuthorizationFailedException e) {
                    // do not show unauthorized resources in search results
View Full Code Here

                    Calendar createdDateTime = Calendar.getInstance();
                    createdDateTime.setTime(child.getCreatedTime());
                    resourceData.setCreatedOn(createdDateTime);
                    CommonUtil.populateAverageStars(resourceData);

                    child.discard();

                    resourceDataList[i] = resourceData;

                } catch (AuthorizationFailedException e) {
                    // do not show unauthorized resources in search results
View Full Code Here

            String[] children = (String[]) topic.getContent();
            for(String childPath: children) {
                processTopicChild(childPath, endpointList, subtopicList, registry);
            }
            r.discard();

            TopicBean topicBean = new TopicBean();
            topicBean.setEndpoints(endpointList.toArray(new MapEntry[endpointList.size()]));
            topicBean.setSubtopics(subtopicList.toArray(new MapEntry[subtopicList.size()]));
            return topicBean;
View Full Code Here

            subcriptions.discard();
            for (String subscription: subscriptionPaths) {
                processTopicChild(subscription, endpointList, topicList, registry);
            }
        }
        r.discard();
    }
}
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.