本文整理汇总了Java中org.alfresco.service.cmr.dictionary.PropertyDefinition.getTitle方法的典型用法代码示例。如果您正苦于以下问题:Java PropertyDefinition.getTitle方法的具体用法?Java PropertyDefinition.getTitle怎么用?Java PropertyDefinition.getTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.alfresco.service.cmr.dictionary.PropertyDefinition
的用法示例。
在下文中一共展示了PropertyDefinition.getTitle方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getCustomProperties
import org.alfresco.service.cmr.dictionary.PropertyDefinition; //导入方法依赖的package包/类
/**
* Get a map of the sites custom properties
*
* @return map of names and values
*/
public ScriptableQNameMap<String, CustomProperty> getCustomProperties()
{
if (this.customProperties == null)
{
// create the custom properties map
ScriptNode siteNode = new ScriptNode(this.siteInfo.getNodeRef(), this.serviceRegistry);
// set the scope, for use when converting props to javascript objects
siteNode.setScope(scope);
this.customProperties = new ContentAwareScriptableQNameMap<String, CustomProperty>(siteNode, this.serviceRegistry);
Map<QName, Serializable> props = siteInfo.getCustomProperties();
for (QName qname : props.keySet())
{
// get the property value
Serializable propValue = props.get(qname);
// convert the value
NodeValueConverter valueConverter = siteNode.new NodeValueConverter();
Serializable value = valueConverter.convertValueForScript(qname, propValue);
// get the type and label information from the dictionary
String title = null;
String type = null;
PropertyDefinition propDef = this.serviceRegistry.getDictionaryService().getProperty(qname);
if (propDef != null)
{
type = propDef.getDataType().getName().toString();
title = propDef.getTitle(this.serviceRegistry.getDictionaryService());
}
// create the custom property and add to the map
CustomProperty customProp = new CustomProperty(qname.toString(), value, type, title);
this.customProperties.put(qname.toString(), customProp);
}
}
return this.customProperties;
}
示例2: getAllowableValuesImpl
import org.alfresco.service.cmr.dictionary.PropertyDefinition; //导入方法依赖的package包/类
/**
* @see org.alfresco.service.cmr.action.ParameterConstraint#getAllowableValues()
*/
protected Map<String, String> getAllowableValuesImpl()
{
Collection<QName> properties = dictionaryService.getAllProperties(null);
Map<String, String> result = new LinkedHashMap<String, String>(properties.size());
for (QName property : properties)
{
PropertyDefinition propertyDef = dictionaryService.getProperty(property);
if (propertyDef != null && propertyDef.getTitle(dictionaryService) != null)
{
result.put(property.toPrefixString(), propertyDef.getTitle(dictionaryService));
}
}
return result;
}
示例3: compare
import org.alfresco.service.cmr.dictionary.PropertyDefinition; //导入方法依赖的package包/类
public int compare(PropertyDefinition arg0, PropertyDefinition arg1)
{
int result = 0;
String title0 = arg0.getTitle(messageLookup);
if (title0 == null)
{
title0 = arg0.getName().toPrefixString();
}
String title1 = arg1.getTitle(messageLookup);
if (title1 == null)
{
title1 = arg1.getName().getPrefixString();
}
if (title0 == null && title1 != null)
{
result = 1;
}
else if (title0 != null && title1 == null)
{
result = -1;
}
else if (title0 != null && title1 != null)
{
result = String.CASE_INSENSITIVE_ORDER.compare(title0, title1);
}
return result;
}
示例4: CustomModelProperty
import org.alfresco.service.cmr.dictionary.PropertyDefinition; //导入方法依赖的package包/类
public CustomModelProperty(PropertyDefinition propertyDefinition, MessageLookup messageLookup)
{
this.name = propertyDefinition.getName().getLocalName();
this.prefixedName = propertyDefinition.getName().toPrefixString();
this.title = propertyDefinition.getTitle(messageLookup);
this.dataType = propertyDefinition.getDataType().getName().toPrefixString();
this.description = propertyDefinition.getDescription(messageLookup);
this.isMandatory = propertyDefinition.isMandatory();
this.isMandatoryEnforced = propertyDefinition.isMandatoryEnforced();
this.isMultiValued = propertyDefinition.isMultiValued();
this.defaultValue = propertyDefinition.getDefaultValue();
this.isIndexed = propertyDefinition.isIndexed();
this.facetable = propertyDefinition.getFacetable();
this.indexTokenisationMode = propertyDefinition.getIndexTokenisationMode();
List<ConstraintDefinition> constraintDefs = propertyDefinition.getConstraints();
if (constraintDefs.size() > 0)
{
this.constraintRefs = new ArrayList<>();
this.constraints = new ArrayList<>();
for (ConstraintDefinition cd : constraintDefs)
{
if (cd.getRef() != null)
{
constraintRefs.add(cd.getRef().toPrefixString());
}
else
{
constraints.add(new CustomModelConstraint(cd, messageLookup));
}
}
}
}
示例5: toFacetablePropertyModel
import org.alfresco.service.cmr.dictionary.PropertyDefinition; //导入方法依赖的package包/类
/** This method returns a {@link FacetablePropertyFTL} for the specified {@link PropertyDefinition}. */
private FacetablePropertyFTL<?> toFacetablePropertyModel(PropertyDefinition propDef, Locale locale)
{
String title = propDef.getTitle(messageLookup, locale);
return new StandardFacetablePropertyFTL(propDef, title);
}