Package org.wso2.carbon.registry.core

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


            return;
        }
        Resource resource = registry.get(path);
        resource.addProperty(name, value);
        registry.put(resource.getPath(), resource);
        resource.discard();
    }

    /**
     * Method to update a property (This removes the old property with the oldName)
     *
 
View Full Code Here


        } else {
            resource.setProperty(name, value);
            resource.removeProperty(oldName);
        }
        registry.put(resource.getPath(), resource);
        resource.discard();
    }

    /**
     * Method to remove property.
     *
 
View Full Code Here

            return;
        }
        Resource resource = registry.get(path);
        resource.removeProperty(name);
        registry.put(resource.getPath(), resource);
        resource.discard();
    }

    /**
     * Method to set resource retention properties of a resource
     * @param path Path of the resource
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

                }
                associationTreePart.append("</div>");

            }

            father.discard();
        } else {
            associationTreePart.append("<div class=\"father-object\" >");
            if (associationTreeBean.getAssoType().equals(CommonConstants.ASSOCIATION_TYPE01)) {
                associationTreePart.append("<ul class=\"tree-row-object\"><li>");
            } else {
View Full Code Here

                if (!tmpAsso.getAssociationType().equals(CommonConstants.ASSOCIATION_TYPE01) && !assoType.equals(CommonConstants.ASSOCIATION_TYPE01))
                    associations.add(tmpAsso);
            }
        }

        resource.discard();
        // if path is equal to the destination path, it is a backward association. we are only displaying
        // the forward associations here

        return associations;
    }
View Full Code Here

            byte[] content = (byte[]) resource.getContent();
            String contentString = "";
            if (content != null) {
                contentString = new String(content);
            }
            resource.discard();

            return contentString;

        } catch (RegistryException e) {
View Full Code Here

            }

            assertFalse("Resoruce not found at the path", value);

            res1.discard();
            resource1.discard();
            Thread.sleep(100);
        }
    }

    public void testContinuousUpdate() throws Exception {
View Full Code Here

                    currentResource = userRegistry.get(actualPath);
                }
            }
            if (currentResource != null) {
                versionsBean.setPermalink(currentResource.getPermanentPath());
                currentResource.discard();
            }

            String[] versions = userRegistry.getVersions(path);

            List <VersionPath> versionPaths = new ArrayList <VersionPath> ();
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.