Class BrowseSearchableEntityProviderMock

  • All Implemented Interfaces:
    org.sakaiproject.entitybroker.entityprovider.capabilities.Browseable, org.sakaiproject.entitybroker.entityprovider.capabilities.BrowseSearchable, org.sakaiproject.entitybroker.entityprovider.capabilities.Createable, org.sakaiproject.entitybroker.entityprovider.capabilities.CRUDable, org.sakaiproject.entitybroker.entityprovider.capabilities.Deleteable, org.sakaiproject.entitybroker.entityprovider.capabilities.Resolvable, org.sakaiproject.entitybroker.entityprovider.capabilities.Sampleable, org.sakaiproject.entitybroker.entityprovider.capabilities.Saveable, org.sakaiproject.entitybroker.entityprovider.capabilities.Updateable, org.sakaiproject.entitybroker.entityprovider.CoreEntityProvider, org.sakaiproject.entitybroker.entityprovider.EntityProvider

    public class BrowseSearchableEntityProviderMock
    extends CRUDableEntityProviderMock
    implements org.sakaiproject.entitybroker.entityprovider.CoreEntityProvider, org.sakaiproject.entitybroker.entityprovider.capabilities.BrowseSearchable
    Stub class to make it possible to test the BrowseSearchable capability, will perform like the actual class so it can be reliably used for testing
    Gets 3 entities, user=aaronz gets entity 2, assoc=siteAZ gets entity 3
    Will perform all CRUDable operations as well as allowing for internal data output processing
    Returns MyEntity objects
    Allows for testing Resolvable and CollectionResolvable as well, returns 2 MyEntity objects if no search restrictions, 1 if "stuff" property is set, none if other properties are set
    Author:
    Aaron Zeckoski (azeckoski @ gmail.com)
    • Constructor Detail

      • BrowseSearchableEntityProviderMock

        public BrowseSearchableEntityProviderMock​(String prefix,
                                                  String[] ids)
    • Method Detail

      • browseEntities

        public List<org.sakaiproject.entitybroker.entityprovider.extension.EntityData> browseEntities​(org.sakaiproject.entitybroker.entityprovider.search.Search search,
                                                                                                      String userReference,
                                                                                                      String associatedReference,
                                                                                                      Map<String,​Object> params)
        Specified by:
        browseEntities in interface org.sakaiproject.entitybroker.entityprovider.capabilities.BrowseSearchable