Package org.dspace.versioning

Examples of org.dspace.versioning.Version


            Item item = Item.find(context, itemID);

            if (AuthorizeManager.isAdmin(context, item) || item.canEdit()) {
                VersioningService versioningService = new DSpace().getSingletonService(VersioningService.class);
                Version version = versioningService.createNewVersion(context, itemID, summary);
                WorkspaceItem wsi = WorkspaceItem.findByItem(context, version.getItem());

                context.commit();

                result.setParameter("wsid", wsi.getID());
                result.setOutcome(true);
View Full Code Here


                versioningService.removeVersion(context, Integer.parseInt(id));
            }
            context.commit();

            //Retrieve the latest version of our history (IF any is even present)
            Version latestVersion = versionHistory.getLatestVersion();
            if(latestVersion == null){
                result.setParameter("itemID", null);
            }else{
                result.setParameter("itemID", latestVersion.getItemID());
            }
            result.setContinue(true);
            result.setOutcome(true);
            result.setMessage(T_version_delete);
View Full Code Here

    header.addCellContent(T_column2);
    header.addCellContent(T_column3);
        header.addCellContent(T_column4);

        VersioningService versioningService = new DSpace().getSingletonService(VersioningService.class);
        Version version = versioningService.getVersion(context, Integer.parseInt(id));

        Row row = table.addRow();
        row.addCell().addContent(version.getVersionNumber());
        row.addCell().addContent(version.getEperson().getEmail());
        row.addCell().addContent(new DCDate(version.getVersionDate()).toString());
        row.addCell().addContent(version.getSummary());


        List fields = main.addList("fields", List.TYPE_FORM);
        Composite addComposite = fields.addItem().addComposite("summary");
        addComposite.setLabel(T_column4);
View Full Code Here

TOP

Related Classes of org.dspace.versioning.Version

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.