![]() ![]() In these cases, invoking the update method lines up the in-memory changes to occur in storage when the Context is committed or completed. ![]() ![]() If anything should go wrong during an operation, the context should always be aborted by invoking abort, to ensure that no inconsistent state is written to the storage.Īdditionally, some changes made to objects only happen in-memory. Primarily, one should note that no change made using a particular object will actually be made in the underlying storage unless complete or commit is invoked on that Context. When creating, modifying or for whatever reason removing data with the content management API, it is important to know when changes happen in-memory, and when they occur in the physical DSpace storage. ![]() Also see the section on the workflow system.Ĭommunity and BitstreamFormat do have static create methods one must be a site administrator to have authorization to invoke these. In the previous chapter there is an overview of the item ingest process which should clarify the previous paragraph. The also contains an implementation called WorkflowItem which represents a submission undergoing a workflow process. The package provides an implementation of InProgressSubmission called WorkspaceItem this is a simple implementation that contains some fields used by the Web submission UI. An InProgressSubmission represents an item under construction once it is complete, it is installed into the main archive and added to the relevant collection by the InstallItem class. Items are first created in the form of an implementation of InProgressSubmission. It makes no sense to create a collection outside of a community, and the authorization system does not have a policy for that. In order to know whether an e-person may create an object, the system must know which container the object is to be added to. The primary reason for this is for determining authorization. For example, to create a collection, one must invoke createCollection on the community that the collection is to appear in:Ĭommunity existingCommunity = Community.find(context, 123) Ĭollection myNewCollection = existingCommunity.createCollection() If an instantiation representing the same underlying archival entity already exists, the find method can simply return that same instantiation to avoid multiple copies and any inconsistencies which might result.Ĭollection, Bundle and Bitstream do not have create methods rather, one has to create an object using the relevant method on the container. A null return value from a static method can in general be dealt with more simply in code. A constructor would have to throw an exception in this case. To construct a brand new item in the system, rather than simply instantiating an in-memory instance of an object in the system.įind methods may often be called with invalid IDs, and return null in such a case. "Constructing" an object may be misconstrued as the action of creating an object in the DSpace system, for example one might expect something like: You can also commit a context, which means that any changes are written to the database, and the context is kept active for further use. You should always abort a context if any error happens during its lifespan otherwise the data in the system may be left in an inconsistent state. If anything has gone wrong, abort is called to roll back any changes and free up the resources. If all goes well, complete is called to commit the changes and free up any resources used by the context. Several operations may be performed using the context object. Typical use of the context object will involve constructing one, and setting the current user if one is authenticated. For example, when first installing the system, there are no authorized administrators who would be able to create an administrator account!Īs noted above, the public API is trusted, so it is up to applications in the application layer to use this flag responsibly. This should only be used in rare, specific circumstances. For example, the Web UI adds a session ID, so that when the logs are analysed the actions of a particular user in a particular session can be tracked.Ī flag indicating whether authorization should be circumvented. Such a group is called a 'special group'.Īny extra information from the application layer that should be added to log messages that are written within this context. For example, a user might automatically be part of a particular group based on the IP address they are accessing DSpace from, even though they don't have an e-person record. Checksum checkerĪny 'special groups' the user is a member of. Support for Other Metadata Schemas 10.2.6. The Configuration Manager (ConfigurationManager) 10.1.2. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |