cancel
Showing results for 
Search instead for 
Did you mean: 

Get DataType from properties

toze
Champ in-the-making
Champ in-the-making
Hi

I have  a node with some properties.
how can i get the dataType from one propertie, using Foundation API?
Im useing ALfresco 3.0
2 REPLIES 2

janv
Employee
Employee
Hi,

Here's an untested example:


            PropertyDefinition propertyDefinition = dictionaryService.getProperty(propertyQName);
            if (propertyDefinition != null)
            {
                DataTypeDefinition dataTypeDefinition = propertyDefinition.getDataType();
                QName dataTypeQName = dataTypeDefinition.getName();
               
                /* … */
            }
Regards,
Jan

toze
Champ in-the-making
Champ in-the-making
Thanks for your answer.

I resolved that with this.
            QName PROP_QNAME = QName.createQName(aspectName, propertyName);
            String className = dictionaryService.getProperty(PROP_QNAME).getDataType().getJavaClassName();