public static ObjectTypeGuiDescriptor getDescriptor(QName relation) { for (ObjectTypeGuiDescriptor descr : ObjectTypeGuiDescriptor.values()) { if (descr.getRelation() != null && descr.getRelation().equals(relation)) { return descr; } } return null; }
public static ObjectTypeGuiDescriptor getDescriptor(Class type) { for (ObjectTypeGuiDescriptor descr : ObjectTypeGuiDescriptor.values()) { if (descr.getType() != null && descr.getType().getClassDefinition().equals(type)) { return descr; } } return null; }
public static ObjectTypeGuiDescriptor getDescriptor(ObjectTypes type) { if (type == null) { return null; } for (ObjectTypeGuiDescriptor descr : ObjectTypeGuiDescriptor.values()) { if (descr.getType() != null && descr.getType().equals(type)) { return descr; } } return null; }
protected String getLocalizedTypeName(QName typeQName, PageBase page) { String targetTypeKey = ObjectTypeGuiDescriptor.getDescriptor(ObjectTypes.getObjectTypeFromTypeQName(typeQName)) .getLocalizationKey(); return page.createStringResource(targetTypeKey).getString(); }