public static DataDictionaryService getDataDictionaryService() { if (dataDictionaryService == null) { dataDictionaryService = KRADServiceLocatorWeb.getDataDictionaryService(); } return dataDictionaryService; }
private static DataDictionaryService getDataDictionaryService() { if (dataDictionaryService == null) { dataDictionaryService = KRADServiceLocatorWeb.getDataDictionaryService(); } return dataDictionaryService; } private static MaintenanceDocumentDictionaryService maintenanceDocumentDictionaryService;
/** * Gets the dataDictionaryService attribute. * * @return Returns the dataDictionaryService. */ public DataDictionaryService getDataDictionaryService() { return dataDictionaryService != null ? dataDictionaryService : KRADServiceLocatorWeb.getDataDictionaryService(); }
protected static DataDictionaryService getDataDictionaryService() { if (dataDictionaryService == null) { dataDictionaryService = KRADServiceLocatorWeb .getDataDictionaryService(); } return dataDictionaryService; } }
/** * @return the dataDictionaryService */ protected DataDictionaryService getDataDictionaryService() { if ( dataDictionaryService == null ) { dataDictionaryService = KRADServiceLocatorWeb.getDataDictionaryService(); } return dataDictionaryService; } }
public static DataDictionaryService getDataDictionaryService() { return KRADServiceLocatorWeb.getDataDictionaryService(); }
private DataDictionaryService getDataDictionaryService() { if ( dataDictionaryService == null ) { dataDictionaryService = KRADServiceLocatorWeb.getDataDictionaryService(); } return dataDictionaryService; } private ConfigurationService getConfigurationService() {
protected DataDictionaryService getDataDictionaryService() { if ( dataDictionaryService == null ) { dataDictionaryService = KRADServiceLocatorWeb.getDataDictionaryService(); } return this.dataDictionaryService; }
private static DataDictionaryService getDataDictionaryService() { if (dataDictionaryService == null) { dataDictionaryService = KRADServiceLocatorWeb.getDataDictionaryService(); } return dataDictionaryService; }
private static DataDictionaryService getDataDictionaryService() { if (dataDictionaryService == null) { dataDictionaryService = KRADServiceLocatorWeb.getDataDictionaryService(); } return dataDictionaryService; }
@Deprecated protected DataDictionaryService getDataDictionaryService() { if (dataDictionaryService == null) { dataDictionaryService = KRADServiceLocatorWeb.getDataDictionaryService(); } return dataDictionaryService; } }
public static String getTitleText(String prependText, Class<?> dataObjectClass, Map<String, String> keyValueMap) { StringBuffer titleText = new StringBuffer(prependText); for (String key : keyValueMap.keySet()) { String fieldVal = keyValueMap.get(key).toString(); if (StringUtils.isNotBlank(fieldVal)) { titleText.append(KRADServiceLocatorWeb.getDataDictionaryService() .getAttributeLabel(dataObjectClass, key) + "=" + fieldVal.toString() + " "); } } return titleText.toString(); }
/** gets the document class from the datadictionary if {@link KualiDocumentFormBase#getDefaultDocumentTypeName()} is overriden to return a valid value otherwise behavior is nondeterministic. */ private Class<? extends Document> getDocumentClass() { return KRADServiceLocatorWeb.getDataDictionaryService().getDocumentClassByTypeName(getDefaultDocumentTypeName()); }
/** * Locates the <code>DictionaryService</code> to discover the type name of the document. * * @return */ protected String discoverDocumentTypeName() { return ((DataDictionaryService) KRADServiceLocatorWeb.getDataDictionaryService()).getDataDictionary().getDocumentEntry(getDocument().getClass().getName()).getDocumentTypeName(); }
/**initializes the header tabs from what is defined in the datadictionary if {@link KualiDocumentFormBase#getDefaultDocumentTypeName()} is overriden to return a valid value. */ protected void initializeHeaderNavigationTabs() { if (StringUtils.isNotBlank(getDefaultDocumentTypeName())) { final KNSDocumentEntry docEntry = (KNSDocumentEntry) KRADServiceLocatorWeb.getDataDictionaryService().getDataDictionary().getDocumentEntry(getDocumentClass().getName()); final List<HeaderNavigation> navList = docEntry.getHeaderNavigationList(); final HeaderNavigation[] list = new HeaderNavigation[navList.size()]; super.setHeaderNavigationTabs(navList.toArray(list)); } }
/** * Examines the BusinessObject's data dictionary entry to determine if it supports * XML export or not and set's canExport appropriately. */ protected void populateExportCapabilities(HttpServletRequest request, String boClassName) { setCanExport(false); BusinessObjectEntry businessObjectEntry = (BusinessObjectEntry) KRADServiceLocatorWeb.getDataDictionaryService().getDataDictionary().getBusinessObjectEntry(boClassName); Class<? extends Exporter> exporterClass = businessObjectEntry.getExporterClass(); if (exporterClass != null) { try { Exporter exporter = exporterClass.newInstance(); if (exporter.getSupportedFormats(businessObjectEntry.getBusinessObjectClass()).contains(KRADConstants.XML_FORMAT)) { setCanExport(true); } } catch (Exception e) { LOG.error("Failed to locate or create exporter class: " + exporterClass, e); throw new RuntimeException("Failed to locate or create exporter class: " + exporterClass); } } }
protected BusinessObjectEntry loadBusinessObjectEntry() { KualiForm kualiForm = KNSGlobalVariables.getKualiForm(); if (kualiForm instanceof LookupForm) { LookupForm lookupForm = (LookupForm) kualiForm; if (!StringUtils.isBlank(lookupForm.getBusinessObjectClassName())) { return KRADServiceLocatorWeb.getDataDictionaryService().getDataDictionary().getBusinessObjectEntry(lookupForm.getBusinessObjectClassName()); } } return null; }
/** * Reads the data dictionary to determine which properties of the document should be serialized. * * @see org.kuali.rice.krad.util.documentserializer.PropertySerializabilityEvaluator#initializeEvaluator(org.kuali.rice.krad.document.Document) */ @Override public void initializeEvaluatorForDataObject(Object businessObject){ DataDictionary dictionary = KRADServiceLocatorWeb.getDataDictionaryService().getDataDictionary(); MaintenanceDocumentEntry maintenanceDocumentEntry = (MaintenanceDocumentEntry) dictionary.getMaintenanceDocumentEntryForBusinessObjectClass(businessObject.getClass()); serializableProperties = new PropertySerializerTrie(); populateSerializableProperties(maintenanceDocumentEntry.getMaintainableSections()); serializableProperties.addSerializablePropertyName("boNotes", true); serializableProperties.addSerializablePropertyName("boNotes.attachment", true); }
public static String getFullyMaskedValue(String className, String fieldName, Object formObject, String propertyName) { String displayMaskValue = null; Object propertyValue = ObjectUtils.getPropertyValue(formObject, propertyName); DataDictionaryEntryBase entry = (DataDictionaryEntryBase) KRADServiceLocatorWeb.getDataDictionaryService() .getDataDictionary().getDictionaryObjectEntry(className); AttributeDefinition a = entry.getAttributeDefinition(fieldName); AttributeSecurity attributeSecurity = a.getAttributeSecurity(); if (attributeSecurity != null && attributeSecurity.isMask()) { MaskFormatter maskFormatter = attributeSecurity.getMaskFormatter(); displayMaskValue = maskFormatter.maskValue(propertyValue); } return displayMaskValue; }
public static String getPartiallyMaskedValue(String className, String fieldName, Object formObject, String propertyName) { String displayMaskValue = null; Object propertyValue = ObjectUtils.getPropertyValue(formObject, propertyName); DataDictionaryEntryBase entry = (DataDictionaryEntryBase) KRADServiceLocatorWeb.getDataDictionaryService() .getDataDictionary().getDictionaryObjectEntry(className); AttributeDefinition a = entry.getAttributeDefinition(fieldName); AttributeSecurity attributeSecurity = a.getAttributeSecurity(); if (attributeSecurity != null && attributeSecurity.isPartialMask()) { MaskFormatter partialMaskFormatter = attributeSecurity.getPartialMaskFormatter(); displayMaskValue = partialMaskFormatter.maskValue(propertyValue); } return displayMaskValue; }