cancel
Showing results for 
Search instead for 
Did you mean: 

Want to get Title from typename in Schedulers

piyush48
Star Contributor
Star Contributor

Hi All,

I want to find title from the Qname or Itemtype as i need to use it in CMIS Query for searching. Like in Our Content Model we have itemtype as :- 

<type name="alf:staff">
      <title>alf (staff)</title>
      <parent>alf:gmrAlf</parent>

i am getting type name writing java code as:- 

QName itemType = this.serviceRegistry.getNodeService().getType(document);
String qName = itemType.getPrefixString();

Where qName is providing me with its type name now i want to get title from the content model for this particular type. Is there any service or relation available which will provide me with title of this itemtype.

I am looking for alf (staff) from type alf:staff.

Thanks and Regards,

Piyush

1 ACCEPTED ANSWER

afaust
Legendary Innovator
Legendary Innovator

You can use the DictionaryService to obtain type/aspect/property definitions to retrieve title / description values. You can use the NamespaceService as a resolver with QName.toPrefixString(namespaceService) to turn long type names into short/prefixed names.

View answer in original post

1 REPLY 1

afaust
Legendary Innovator
Legendary Innovator

You can use the DictionaryService to obtain type/aspect/property definitions to retrieve title / description values. You can use the NamespaceService as a resolver with QName.toPrefixString(namespaceService) to turn long type names into short/prefixed names.

Getting started

Explore our Alfresco products with the links below. Use labels to filter content by product module.