Package org.dspace.app.xmlui.utils

Examples of org.dspace.app.xmlui.utils.DSpaceValidity


              if (!(dso instanceof Collection))
                  return null;
 
              collection = (Collection) dso;
 
              DSpaceValidity validity = new DSpaceValidity();
             
              // Add the actual collection;
              validity.add(collection);
 
              // add reciently submitted items
              for(BrowseItem item : getRecientlySubmittedIems(collection))
              {
                  validity.add(item);
              }
             
              this.validity = validity.complete();
          }
          catch (Exception e)
          {
              // Just ignore all errors and return an invalid cache.
          }
View Full Code Here


    {
        if (validity == null)
        {
            try
            {
                DSpaceValidity validity = new DSpaceValidity();
                DSpaceObject dso = HandleUtil.obtainHandle(objectModel);

                if (dso != null)
                    validity.add(dso);
               
                BrowseInfo info = getBrowseInfo();
               
                // Are we browsing items, or unique metadata?
                if (isItemBrowse(info))
                {
                    // Add the browse items to the validity
                    for (BrowseItem item : (java.util.List<BrowseItem>) info.getResults())
                    {
                        validity.add(item);
                    }
                }
                else
                {
                    // Add the metadata to the validity
                    for (String[] singleEntry : browseInfo.getStringResults())
                    {
                        validity.add(singleEntry[0]+"#"+singleEntry[1]);
                    }
                }

                this.validity =  validity.complete();
            }
            catch (Exception e)
            {
                // Just ignore all errors and return an invalid cache.
            }
View Full Code Here

    {
        if (this.validity == null)
        {
            try
            {
                DSpaceValidity validity = new FeedValidity();
               
                Context context = ContextUtil.obtainContext(objectModel);

                DSpaceObject dso = null;
               
                if (handle != null && !handle.contains("site"))
                {
                    dso = HandleManager.resolveToObject(context, handle);
                }
               
                validity.add(dso);
               
                // add recently submitted items
                for(Item item : getRecentlySubmittedItems(context,dso))
                {
                    validity.add(item);
                }

                this.validity = validity.complete();
            }
            catch (RuntimeException e)
            {
                throw e;
            }
View Full Code Here

    {
        if (validity == null)
        {
            try
            {
                DSpaceValidity newValidity = new DSpaceValidity();
                DSpaceObject dso = HandleUtil.obtainHandle(objectModel);

                if (dso != null)
                {
                    newValidity.add(dso);
                }

                BrowseInfo info = getBrowseInfo();

                // Are we browsing items, or unique metadata?
                if (isItemBrowse(info))
                {
                    // Add the browse items to the validity
                    for (BrowseItem item : (java.util.List<BrowseItem>) info.getResults())
                    {
                        newValidity.add(item);
                    }
                }
                else
                {
                    // Add the metadata to the validity
                    for (String[] singleEntry : browseInfo.getStringResults())
                    {
                        newValidity.add(singleEntry[0]+"#"+singleEntry[1]);
                    }
                }

                validity = newValidity;
            }
View Full Code Here

      {
        // Only use the DSpaceValidity object is someone is logged in.
        if (context.getCurrentUser() != null)
        {
            try {
                DSpaceValidity validity = new DSpaceValidity();
               
                validity.add(eperson);
               
                Group[] groups = Group.allMemberGroups(context, eperson);
                for (Group group : groups)
                {
                  validity.add(group);
                }
               
                this.validity = validity.complete();
            }
            catch (SQLException sqle)
            {
                // Just ignore it and return invalid.
            }
View Full Code Here

      {
        // Only use the DSpaceValidity object is someone is logged in.
        if (context.getCurrentUser() != null)
        {
            try {
                DSpaceValidity validity = new DSpaceValidity();
               
                validity.add(eperson);
               
                Group[] groups = Group.allMemberGroups(context, eperson);
                for (Group group : groups)
                {
                  validity.add(group);
                }
               
                this.validity = validity.complete();
            }
            catch (SQLException sqle)
            {
                // Just ignore it and return invalid.
            }
View Full Code Here

      {
        // Only use the DSpaceValidity object is someone is logged in.
        if (context.getCurrentUser() != null)
        {
            try {
                DSpaceValidity validity = new DSpaceValidity();

                validity.add(eperson);

                Group[] groups = Group.allMemberGroups(context, eperson);
                for (Group group : groups)
                {
                  validity.add(group);
                }

                    DSpaceObject dso = HandleUtil.obtainHandle(objectModel);
                    if(dso != null)
                    {
                        validity.add(dso);
                    }

                this.validity = validity.complete();
            }
            catch (SQLException sqle)
            {
                // Just ignore it and return invalid.
            }
View Full Code Here

      {
        // Only use the DSpaceValidity object is someone is logged in.
        if (context.getCurrentUser() != null)
        {
            try {
                DSpaceValidity validity = new DSpaceValidity();

                validity.add(eperson);

                Group[] groups = Group.allMemberGroups(context, eperson);
                for (Group group : groups)
                {
                  validity.add(group);
                }

                this.validity = validity.complete();
            }
            catch (SQLException sqle)
            {
                // Just ignore it and return invalid.
            }
View Full Code Here

                    return null;
                }
 
              Collection collection = (Collection) dso;
 
              DSpaceValidity validity = new DSpaceValidity();
             
              // Add the actual collection;
              validity.add(collection);
             
              // Add the eperson viewing the collection
              validity.add(eperson);
             
              // Include any groups they are a member of
              Group[] groups = Group.allMemberGroups(context, eperson);
              for (Group group : groups)
              {
                validity.add(group);
              }
             
              this.validity = validity.complete();
          }
          catch (Exception e)
          {
              // Just ignore all errors and return an invalid cache.
          }
View Full Code Here

                    return null;
                }

              community = (Community) dso;

              DSpaceValidity validity = new DSpaceValidity();
              validity.add(community);

              // Recently submitted items
              for (BrowseItem item : getRecentlySubmittedItems(community))
              {
                  validity.add(item);
              }

              this.validity = validity.complete();
          }
          catch (Exception e)
          {
              // Ignore all errors and invalidate the cache.
          }
View Full Code Here

TOP

Related Classes of org.dspace.app.xmlui.utils.DSpaceValidity

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.