cspace-config Record

What is a Record

Records are used in creation of the UISPEC.
They connect the ui layer concepts of authority,procedure and object with the service layer

Where are Records

Records are part of the spec element of the cspace-config

Structure

<spec>
<records>
<enum-blank>this is a blank value</enum-blank>
...
   <record id="collection-object" in-findedit="yes">
      <services-url>collectionobjects</services-url>
      <services-list-path>collectionobjects-common-list/collection-object-list-item</services-list-path>
      <services-record-path id="common">collectionobjects_common:http://collectionspace.org/services/collectionobject,collectionobjects_common</services-record-path>
      <services-record-path id="naturalhistory">collectionobjects_naturalhistory:http://collectionspace.org/services/collectionobject/domain/naturalhistory,collectionobjects_naturalhistory</services-record-path>
      <web-url>objects</web-url>
      <tab-url>object-tab</tab-url>
      <number-selector>.csc-accession-number</number-selector>
      <row-selector>.csc-recordList-row:</row-selector>
      <list-key>objects</list-key>

      <structures/>

      <field/>
      <repeat/>
   </record>
</spec>

Record

Attributes

MUST HAVE

id
  • string
  • no default - required
  • generally the singular form of the concept

CAN HAVE

in-findedit
  • boolean true|false 1|0 yes|no
  • default false
  • if true this record will be included in the findedit uispec
in-recordlist
  • boolean true|false 1|0 yes|no
  • default true
  • if true this record type will appear in theUISchema recordlist json sent to the UI (used for list of records to search thr etc)
type
  • set record,authority,compute-displayname,authorizationdata,procedure,userdata,id
  • default record
  • affects how this record is treated by the service layer and the app layer
    • record: affects the structure of the payload sent to the service layer
    • authority: affects the structure of the payload sent to the service layer
    • authorizationdata: affects the structure of the payload sent to the service layer. Used by permissions and roles
    • userdata: affects the structure of the payload sent to the service layer. Used by accounts
    • computer_displayname: used in authorities. If set then a field displayNameComputed will be added to the payload sent to the service layer
    • procedure: only affects the App code - used for differentiating results required by UI
    • id: used by idgenerator - should not be assigned to anything else.
Single Elements

MUST HAVE
none

CAN HAVE

authority-vocab-type
  • string
  • default "PersonAuthority"
  • service layer flag to differentiate authority types e.g. PersonAuthority, OrgAuthority, ContactAuthority, enum (means Vocab)
authorization-includes
  • string
  • default services_url
  • path that the service layer might return in permissions e.g. account/accountroles where url is really account/*/accountroles. This allows mapping of service names to UInames so the permissions list shown by the UI is more friendly
authorization-view
  • boolean
  • default true
  • for the UI so they know whether a permissions should be a hidden input or whether the client can set the level for this permission
hasdeletemethod
  • boolean
  • default false
  • used in subrecords like accountroles and rolepermissions that have different ways of dealing with delete
enum-blank
  • String
  • records/enum-blank
  • this will be used in enum lists in fields as the value of the blank field unless a value is specified on the field level - if this tag is missing then it falls back to the value in records/enum-blank and if that is missing it falls back to "Default String"
is-multipart
  • boolean true|false 1|0 yes|no
  • default true
  • if service layer expects a multipart document (currently most authorizationdata is not multipart)
membership-tag
  • string
  • default "inAuthority"
  • this tag used to be used to differentiate between authority and vocabularies - now they are more similar this tag can be ignored
number-selector
  • string
  • default ".csc-entry-number"
  • uispec selector for number in RH side
primaryfield
  • string
  • default ""
  • used in subrecords like accountroles and rolepermissions
refobj-used
  • boolean true|false 1|0 yes|no
  • default true
  • if service layer has refObjects for this record type (currently authorities and authorizationdata do not have termsUsed)
row-selector
  • string
  • default ".csc-recordList-row:"
  • uispec selector for row
services-abstract
  • string
  • default org.collectionspace.services.{services-tenant-singular}.{services-tenant-plural}CommonList
  • used in creating service configuration
services-common
  • string
  • default {services-abstract}${services-tenant-singular}ListItem
  • used in creating service configuration
services-dochandler
  • string
  • default org.collectionspace.services.{services-tenant-singular
    }.nuxeo.{services-tenant-singular}DocumentModelHandler
  • used in creating service configuration
services-fields-path
  • string
  • default {services_url}-common-list/fieldsReturned
  • service layer paths to get field list from list view
services-instances-path
services-list-path
  • string
  • default {services_url}-common-list/{services_url}-list-item
  • service layer paths to get data list
services-schemalocation
services-search-keyword
  • string
  • default "kw"
  • defines the 'string' that the service layer uses for this record type to denote keyword search
services-single-instance-path
services-tenant-auth-plural
  • string
  • default services-tenant-auth-singular+"s"
  • used in creating service configuration
services-tenant-auth-singular
  • string
  • default services-url
  • used in creating service configuration
services-tenant-plural
  • string
  • default {services-tenant-singular}s"
  • used in creating service configuration
services-tenant-singular
  • string
  • default services-url
  • used in creating service configuration
services-url
  • string
  • default id
  • service layer url for accessing this record type
services-validator
  • string
  • default org.collectionspace.services.{services-tenant-singular }.nuxeo.{services-tenant-singular}ValidatorHandler
  • used in creating service configuration
tab-url
  • string
  • default web_url+"-tab"
  • ui url used to specify a tab page uispec e.g. /chain/{tab-url}/uispec vs /chain/{web-url}/uispec
terms-used
  • boolean true|false 1|0 yes|no
  • default true
  • if service layer has termsUsed for this record type (currently authorizationdata does not have termsUsed)
terms-used-url
  • string
  • default "nameAuthority"
  • allows for different nameAuthority if required by Service layer
list-key
  • string
  • default "procedures"+id.substring(0,1).toUpperCase()+id.substring(1)
  • uispec name used in RH side creation
ui-url
  • string
  • default web_url+".html"
  • ui url used for record page
urn-syntax
  • string
  • default
    "urn:cspace.org.collectionspace.demo."+id+":name({vocab}):"+id+":name({entry})'{display}'"
  • used by service layer to construct authority names
vocab-syntax
  • string
  • default urn:cspace:name
  • used when dealing with vocabularies/authorities
web-url
  • string
  • default @id
  • path that the UI uses in /chain/{web-url} to talk to the app layer if different from the id
Complex Elements
structures

used to define what appears in the uispecs

instances

used to config the vocabularies within an authority

field

used to config the fields that are shown on the edit pages and link them to the fields in the service layer

repeat

used to config the repeatable fields that are shown on the edit pages and link them to the fields in the service layer

group

used to config the groups of fields that are shown on the edit pages and link them to the fields in the service layer

Useful Information