OLE Instance Editor Technical Specification

Instance Editor:

Purpose: Editing the instance document within OLE.

Workflow: The instance editor should be opened from any screen in which an instance is available for edit/view.

VIEW:   

the Instance editor will contain a left pane/menu (displaying a list of instance/holdings and related items to select from) and a right pane (containing each of the elements within instance/holdings, items, and related metadata). The right pane will break down the elements into logical tabs that group related elements.

   
The Instance Editor View will contain Single Form with Navigation (Tree structure) and two pages ( one for Holdings and the other for Item tab sections), displaying one at a time based on the selected item on left pane. 

Sample code for View:

<bean id="InstanceEditorView" parent="Uif-FormView">

        <property value="Instance Editor"/>

        <propertymso-bidi-font-weight:normal">navigation">

            <ref bean="LeftPane"/>

        </property>

        <property>

            <list>

                <bean parent="Uif-Page">

                    <property name="items">

                        <list>

                            <ref bean="HoldingTabsSection"/>

                        </list>

                    </property>

                </bean>

                <bean parent="Uif-Page">

                    <property name="items">

                        <list>

                            <ref bean="ItemTabsSection"/>

                        </list>

                    </property>

                </bean>

            </list>

        </property>

        <property name="footer">

            <ref bean="InstanceEditor_Footer" />

        </property>

        <property value="org.kuali.ole.editor.form.InstanceEditorForm"/>

    </bean>

<bean id="HoldingTabsSection" parent="Uif-TabSection">

        <property>

            <list>

                <ref bean="Holdings"/>

                <ref bean="Serial"/>

                <ref bean="ActionNotes"/>

                <ref bean="ExtentOfOwnership"/>

                <ref bean="FormerIdentifiers"/>

            </list>

        </property>

    </bean>

    <bean id="ItemTabsSection"   parent="Uif-TabSection">

        <property>

            <list>

                <ref bean="Item"/>

                <ref bean="Location"/>

                <ref bean="ElectronicLA"/>

                <ref bean="HighDensityStorage"/>

                <ref bean="POVendorInfo"/>

            </list>

        </property>

    </bean>

Right Pane- HoldingTabsSection:

Holdings:   

We will use Vertical Box Section with Grid group and Stacked collection.

Serial:

Action Notes:

For this section, we will use Uif-StackedCollectionSection to repeat entire Action Notes section and Uif-StackedSubCollection-WithinSection to repeat individual fields

Extent of Ownership: 

 

Former Identifiers: 

 
 

Right Pane- ItemTabsSection:

Item:

We will use Uif-GridGroup with appropriate controls (text, dropdown).

This tab contains Status, Suppress From Public and Fast Add Flag Metadata fields which can be stored/retrieved from Docstore using Additional Attributes

Location:

We will use Uif-GridGroup with appropriate controls (text, dropdown). And Uif-HorizontalFieldGroup for Call Number section.

Electronic L&A:

We will use Uif-GridGroup with appropriate controls (text, dropdown).

High Density Storage: 

PO/Vendor Info:  

Audit Details:

The history/audit trail should be available while viewing the instance editor screens. This includes Date Entered, Created By, and multiple Last Updated Date & Last Updated By.

  • System Dates/Times should be translated into more easily readable Dates/Times.
  • If necessary, use next/prev to paginate the historical updated information.
  • This Information should be sortable by date and by user.

Participants: InstanceEditorController.java, InstanceEditorView.xml

Workflow: Get BIB record through the request in Controller loadInstanceRecord() method.

     Set Additional attributes which consists of Date Entered, Created By in both Holdings and Items.

SampleCode:

InstanceEditorController.java

public ModeiAndView loadInstanceRecord(@ModelAttribute("KualiForm") UifFormBase form, BindingResult result, HttpServletRequest request, HttpServletResponse response) {

      Set additional attributes for both holdings and items here in this method

}

InstanceEditorView.xml

// For Holdings

<bean id="displayHoldingHistoryLink" parent="Uif-ActionLink" p:actionLabel="Display History" p:clientSideJs="displayHoldingsRecordAuditInfo();"/>
                            <bean id="DisplayHoldingsHistorySection" parent="Uif-VerticalBoxGroup"  p:hidden="true" p:fieldBindingObjectPath="holdingRecordMetaData">
                                <property name="items">
                                    <list>
                                       <bean id="createdSection" parent="Uif-HorizontalBoxSection">
                                            <property name="title" value="CREATED BY"/>
                                            <property name="items">
                                                <list>
                                                    <bean parent="Uif-DataField" p:propertyName="createdBy"
                                                          p:alternateDisplayValue="@

{holdingRecordMetaData.createdBy}
on @

{holdingRecordMetaData.dateEntered}
"
                                                          p:render="@

{holdingRecordMetaData.createdBy ne null}
"/>
                                                </list>
                                            </property>
                                        </bean>
                                        <bean id="BorderSection" parent="Uif-VerticalBoxSection" p:style="height:20px;border-bottom:solid;"/>
                                        <bean id="updatedBySection" parent="Uif-TableCollectionSection" p:layoutManager.numberOfColumns="2" p:style="width:500px">
                                            <property name="title" value="Updated By:" />
                                            <property name="collectionObjectClass"
                                                      value="org.kuali.ole.editor.bo.InstanceRecordUpdatedDetails" />
                                            <property name="propertyName" value="updatedDetailsList" />
                                            <property name="layoutManager.renderSequenceField" value="false" />
                                            <property name="layoutManager.generateAutoSequence" value="false" />
                                            <property name="renderAddLine" value="false"/>
                                            <property name="addLineLabel" value=""/>
                                            <property name="layoutManager.richTable.render" value="true" />
                                            <property name="items">
                                                <list>
                                                    <bean parent="Uif-DataField" p:label="Userid" p:propertyName="lastUpdatedBy">
                                                    </bean>
                                                    <bean parent="Uif-DataField" p:label="Date" p:propertyName="lastUpdated">
                                                    </bean>
                                                </list>
                                            </property>
                                            <property name="renderLineActions" value="false"/>
                                        </bean>
                                    </list>
                                </property>
                            </bean>

/ For Items

<bean id="displayItemHistoryLink" parent="Uif-ActionLink" p:actionLabel="Display History" p:clientSideJs="displayItemRecordAuditInfo();"/>
                            <bean id="DisplayItemHistorySection" parent="Uif-VerticalBoxGroup"  p:hidden="true" p:fieldBindingObjectPath="itemRecordMetaData">
                                <property name="items">
                                    <list>
                                        <bean id="itemCreatedSection" parent="Uif-HorizontalBoxSection">
                                            <property name="title" value="CREATED BY"/>
                                            <property name="items">
                                                <list>
                                                    <bean parent="Uif-DataField" p:propertyName="createdBy"
                                                          p:alternateDisplayValue="@

{itemRecordMetaData.createdBy}
on @

{itemRecordMetaData.dateEntered}
"
                                                          p:render="@

{itemRecordMetaData.createdBy ne null}
"/>
                                                </list>
                                            </property>
                                        </bean>
                                        <bean id="itemBorderSection" parent="Uif-VerticalBoxSection" p:style="height:20px;border-bottom:solid;"/>
                                        <bean id="itemUpdatedBySection" parent="Uif-TableCollectionSection" p:layoutManager.numberOfColumns="2" p:style="width:500px">
                                            <property name="title" value="Updated By:" />
                                            <property name="collectionObjectClass"
                                                      value="org.kuali.ole.editor.bo.InstanceRecordUpdatedDetails" />
                                            <property name="propertyName" value="updatedDetailsList" />
                                            <property name="layoutManager.renderSequenceField" value="false" />
                                            <property name="layoutManager.generateAutoSequence" value="false" />
                                            <property name="renderAddLine" value="false"/>
                                            <property name="addLineLabel" value=""/>
                                            <property name="layoutManager.richTable.render" value="true" />
                                            <property name="items">
                                                <list>
                                                    <bean parent="Uif-DataField" p:label="Userid" p:propertyName="lastUpdatedBy">
                                                    </bean>
                                                    <bean parent="Uif-DataField" p:label="Date" p:propertyName="lastUpdated">
                                                    </bean>
                                                </list>
                                            </property>
                                            <property name="renderLineActions" value="false"/>
                                        </bean>
                                    </list>
                                </property>
                            </bean>

Left Pane:

Workflow: Bib record has been selected and the user has indicated they would like to edit the instance/items which are related to it.

Left pane should be Uif-Navigation with Uif-Tree component having hierarchy of Instances and Items related to selected bib.

1. Load Instance Records for a selected Bib record:

Participants: InstanceEditorController.java, InstanceEditorFormDataHandler.java, InstanceEditorView.xml, InstanceEditorForm.java.

Workflow:

Get bibId from request in Controller start() Method.

Build data for Left Pane while iterating list of Instance records for bibId.

Sample Code:

InstanceEditorForm.java.

private Tree<String, String> instanceHierarchy = new Tree<String, String>()

// Getters and Setters

InstanceEditorFormDataHandler.java

Need to add nodes to Tree by making Holdings as root and items as nodes.

public InstanceEditorForm buildLeftPaneData(InstanceEditorForm instanceEditorForm)

{ Node<String, String> holdingLevel = new Node<String, String>(textualHolding, textualHolding)  holdingLevel.addChild(new Node<String, String>(itemContent, "Item")); Node<String, String> root = new Node<String, String>("Root", "Root"); root.addChild(holdingLevel); instanceEditorForm.getInstanceHierarchy().setRootElement(root); }

InstanceEditorController.java

public ModelAndView start(@ModelAttribute("KualiForm") UifFormBase form, BindingResult result,
                              HttpServletRequest request, HttpServletResponse response)

{ bibId = request.getParameter("bibId"); getInstanceEditorFormDataHandler().buildLeftPaneData(bibId);&nbsp; }


public ModeiAndView loadInstanceRecord(@ModelAttribute("KualiForm") UifFormBase form, BindingResult result, HttpServletRequest request, HttpServletResponse response) {

    calls InstanceEditorFormDataHandler's buildLeftPaneData() method

}

InstanceEditorView.xml:

<bean id="ExistingRecordNavigation" parent="Uif-TreeSection" p:render="@

{existing eq 'true'}
">

<property name="title" value=""/>

<property name="propertyName" value="instanceHierarchy"/>

</bean>

<bean id="NewRecordNavigation" parent="Uif-VerticalBoxSection" p:render="@

{existing eq 'false'}
">

<property name="items">

<list>

<bean parent="Uif-NavigationActionLink" p:navigateToPageId="HoldingTabs"

p:actionLabel="Holdings"/>

<bean parent="Uif-NavigationActionLink" p:navigateToPageId="ItemTabs"

p:actionLabel="Item"/>

</list>

</property>

</bean>

2. Creating a new instance within the instance editor screen:

The system should provide a link or a button that will allow a user to indicate they would like to create a new instance to
be attached to the bibliographic record they are currently looking at the instances off.

When user clicks the ‘Create Instance’ button, the result should be to display the instance editor with new (empty) instance and child item – should be represented on the left hand menu (with a placeholder) so the user has the ability to navigate to the details of the child item and back to the details of the instance. In addition, this will allow users to navigate to the other (existing) instances and items and to create multiple items on the new instance.

Participants: InstanceEditorController.java, InstanceEditorFormDataHandler.java, InstanceEditorView.xml

Sample code:

   

<bean id="createNewInstance" parent="Uif-SecondaryActionButton" p:methodToCall="createNewInstance" p:actionLabel="Create Instance"/>

    @RequestMapping(params = "methodToCall=createNewInstance")
    public ModelAndView createNewInstance(@ModelAttribute("KualiForm") UifFormBase form, BindingResult result,
                                        HttpServletRequest request, HttpServletResponse response)

{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InstanceEditorForm instanceEditorForm = (InstanceEditorForm) form; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Add New Instance as first record for Uif-Tree in Left pane. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return super.updateComponent(instanceEditorForm, result, request, response); &nbsp;&nbsp;&nbsp; }

Validations :

If the user attempts to click the “Create Instance” button while they are working on an un-submitted new
instance, present an error message
  1) If the user attempts to click the “Create Instance” button while they are working on an un-submitted new instance, present an error message (“Cannot create additional new instance. Unsaved instance exits.”).

  2) If the user attempts to leave this page with an un-submitted new instance, warn them they will lose any unsaved data (An unsaved instance exists are you sure you want to exit? Yes/no) .

  3) If the user attempts to click cancel button with an un-submitted new instance, warn them they will lose any unsaved data (An unsaved instance exists are you sure you want to cancel? Yes/no) .

  *Participants :  *InstanceEditorController.java, InstanceEditorForm.java, InstanceEditorView.xml.

  Sample code: 
                       

 <bean id="MessageSection" parent="Uif-VerticalBoxSection">
                                <property name="items">
                                      <list>
                                           <bean parent="Uif-MessageField" p:messageText="@

{message}
" p:styleClasses="messageClass"/>                                      </list>
                               </property>
                        </bean>

3. Creating a new Item (on an existing Instance):

 Each Instance should have an icon next to it that when clicked will create a new item within that instance
  

  

When user clicks the ‘New Item Icon/Button’ button, the result should be to display the item editor with new (empty) item – should be represented on the left hand menu (with a placeholder) so the user has the ability to navigate to the details of the item. In addition, this will allow users to navigate to the other (existing) items and to create multiple items on the new instance.

Participants: InstanceEditorController.java, InstanceEditorFormDataHandler.java, InstanceEditorView.xml

Sample code:

   

<bean id="createNewItem" parent="Uif-SecondaryActionButton" p:methodToCall="createNewItem" p:actionLabel="Create New Item"/>

    @RequestMapping(params = "methodToCall=createNewItem")
    public ModelAndView createNewItem(@ModelAttribute("KualiForm") UifFormBase form, BindingResult result,
                                        HttpServletRequest request, HttpServletResponse response)

{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InstanceEditorForm instanceEditorForm = (InstanceEditorForm) form; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Add New Item as first record for Uif-Tree in Left pane. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return super.updateComponent(instanceEditorForm, result, request, response); &nbsp;&nbsp;&nbsp; }

Validations :

If the user attempts to click the “Create Instance” button while they are working on an un-submitted new
instance, present an error message
  1) If the user attempts to click the “Create Item” button while they are working on an un-submitted new item, present an error message (“Cannot create additional new item. Unsaved item exits.”).

  2) If the user attempts to leave this page with an un-submitted new item, warn them they will lose any unsaved data (An unsaved item exists are you sure you want to exit? Yes/no) .

  3) If the user attempts to click cancel button with an un-submitted new item, warn them they will lose any unsaved data (An unsaved item exists are you sure you want to cancel? Yes/no) .

 * Participants :  *InstanceEditorController.java, InstanceEditorForm.java, InstanceEditorView.xml.

  Sample code: 
                         

<bean id="MessageSection" parent="Uif-VerticalBoxSection">
                                <property name="items">
                                      <list>
                                           <bean parent="Uif-MessageField" p:messageText="@ 



{message}
" p:styleClasses="messageClass"/>                                      </list>
                               </property>
                        </bean>

FORM:

Instance Editor Form will hold all related data to display in UI.

Sample Form:

public class InstanceEditorForm extends UifFormBase {

    private OleInstance instance; 

    private InstanceRecordMetaData itemRecordMetaData;

    private InstanceRecordMetaData holdingRecordMetaData;

    private String uuid;

    private Tree<String, String> instanceHierarchy;

    private String message;

    //getters and setters

}

CONTROLLER:

InstanceEditorController will extend from UifControllerBase and will have the following methods

  1. start()
  2. submit()
  3. loadInstanceRecord()

Test-Cases:

  1. InstanceEditorController_UT
    1. testSubmit()
  2. DocstoreHelperService_UT
    1. testCreateNewInstanceRecordToDocstore()

DocStore Fields Mapping:

The below link will provide details of Fields using in different tabs along with docstore filed mapping.

           Docstore-field-mapping          

DocStore Handlers :

These handlers are for converting Form data to XML and vice-versa.

  1. WorkInstanceOlemlRecordProcessor
  2. WorkHoldingOlemlRecordProcessor
  3. WorkItemOlemlRecordProcessor

Drop-down source data Mapping:

dropdown_Source_data

Q&A:

Scenario

Question

Answer

When the instance is being displayed the instance.instanceIdentifier (System-assigned unique ID for the Instance Document.) should be visible. When an item is being displayed the item.itemIdentifier (Maps to MFHD 876 $a Internal item number - System-assigned unique ID) should be visible.

Where we need to display this Information?

Display at the top of each tab

Metadata fields (Last Updated by, Date)

Which data we need to display?( Means Holdings will contain its own data and item records will have its own data. Also, from docstore, we will get dateEntered and lastUpdated only. What about updated By, Created)

When click on holdings, display holding metadata and when click on Item display Item data.

For Audit, asking to show at least 10 update initially (

From where we can get this information?

Need to implement logic in docstore (maintain Version)

ACCESS METHOD & RELATIONSHIP / REQUIRED FIELDS [5]: These fields are only required if electronicLocationAndAccess element is used.

Here what “used” means?

Refers to Required field. Means if Electronic Location & Access tab is used, then [5] is mandatory

Referring to User requirements document, we do have mock UI screens for Holdings tab-Location, Serial and Action Notes.

What about remaining tabs?

No mock-ups

Holdings and Item tabs

Form where we can get data for dropdown fields?

Refer OLE-2806

 

What is the max-length for “token” fields?

 

 

Operated as a Community Resource by the Open Library Foundation