Package org.dspace.versioning

Examples of org.dspace.versioning.VersioningService


        DatabaseManager.delete(ourContext, itemRow);
    }
   
    private void removeVersion() throws AuthorizeException, SQLException
    {
        VersioningService versioningService = new DSpace().getSingletonService(VersioningService.class);
        if(versioningService.getVersion(ourContext, this)!=null)
        {
            versioningService.removeVersion(ourContext, this);
        }else{
            IdentifierService identifierService = new DSpace().getSingletonService(IdentifierService.class);
            try {
                identifierService.delete(ourContext, this);
            } catch (IdentifierException e) {
View Full Code Here


        DatabaseManager.delete(ourContext, itemRow);
    }
   
    private void removeVersion() throws AuthorizeException, SQLException
    {
        VersioningService versioningService = new DSpace().getSingletonService(VersioningService.class);
        if(versioningService.getVersion(ourContext, this)!=null)
        {
            versioningService.removeVersion(ourContext, this);
        }else{
            IdentifierService identifierService = new DSpace().getSingletonService(IdentifierService.class);
            try {
                identifierService.delete(ourContext, this);
            } catch (IdentifierException e) {
View Full Code Here

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

            if (AuthorizeManager.authorizeActionBoolean(context, item,
                    Constants.WRITE) || 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();
View Full Code Here

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

            if (AuthorizeManager.authorizeActionBoolean(context, item,
                    Constants.WRITE))
            {
                VersioningService versioningService = new DSpace()
                        .getSingletonService(VersioningService.class);
                versioningService.updateVersion(context, itemID, summary);

                context.commit();
            }
        }
        catch (Exception ex)
View Full Code Here

    {

        try
        {

            VersioningService versioningService = new DSpace()
                    .getSingletonService(VersioningService.class);
            versioningService.restoreVersion(context, versionID, summary);

            context.commit();

        }
        catch (Exception ex)
View Full Code Here

    {

        try
        {

            VersioningService versioningService = new DSpace()
                    .getSingletonService(VersioningService.class);
            VersionHistory versionHistory = versioningService
                    .findVersionHistory(context, itemId);

            for (String id : versionIDs)
            {
                versioningService.removeVersion(context, Integer.parseInt(id));
            }
            context.commit();

            // Retrieve the latest version of our history (IF any is even
            // present)
View Full Code Here

     * @return history
     */
    public static VersionHistory retrieveVersionHistory(Context context,
            Item item)
    {
        VersioningService versioningService = new DSpace()
                .getSingletonService(VersioningService.class);
        return versioningService.findVersionHistory(context, item.getID());
    }
View Full Code Here

        String result = "";

        try
        {
            Integer versionID = Integer.parseInt(stringVersionID);
            VersioningService versioningService = new DSpace()
                    .getSingletonService(VersioningService.class);
            Version version = versioningService.getVersion(context, versionID);
            if (version != null)
            {
                result = version.getSummary();
            }
View Full Code Here

        header.addCellContent(T_column5);


        for (String id : idsString.split(","))
        {
            VersioningService versioningService = new DSpace().getSingletonService(VersioningService.class);
            Version version = null;

            if(StringUtils.isNotBlank(id))
            {
                version = versioningService.getVersion(context, Integer.parseInt(id));
            }

            if(version!=null)
            {
                Row row = table.addRow();
View Full Code Here

    main.addHidden("versioning-continue").setValue(knot.getId());
  }


    private org.dspace.versioning.Version getVersion(int versionID){
        VersioningService versioningService = new DSpace().getSingletonService(VersioningService.class);
        return versioningService.getVersion(context, versionID);
    }
View Full Code Here

TOP

Related Classes of org.dspace.versioning.VersioningService

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.