/** * Method to set the configuration for the artifact list UI. * * @param listConfigurations the configuration for the artifact list UI. */ public void setUIListConfigurations(OMElement listConfigurations) { Iterator iterator = listConfigurations.getChildrenWithName( new QName("column")); List<UIListConfiguration> configurations = new LinkedList<UIListConfiguration>(); while (iterator.hasNext()) { OMElement configurationElement = (OMElement) iterator.next(); OMElement dataElement = configurationElement.getFirstChildWithName( new QName("data")); if (dataElement != null) { String name = configurationElement.getAttributeValue(new QName("name")); String key = dataElement.getAttributeValue(new QName("value")); String type = dataElement.getAttributeValue(new QName("type")); String expression = dataElement.getAttributeValue(new QName("href")); if (key != null && name != null) { configurations.add(new UIListConfiguration(key, type, name, expression)); } } } this.listConfigurations = configurations.toArray(new UIListConfiguration[configurations.size()]); }
/** * Method to obtain the list of expressions that will be used to populate the content on the * artifact list UI. * * @return the list of expressions that will be used to populate the content on the artifact * list UI. */ public String[] getExpressionsOnListUI() { String[] expressionsOnListUI = new String[listConfigurations.length]; for (int i = 0; i < listConfigurations.length; i++) { expressionsOnListUI[i] = listConfigurations[i].getExpression(); } return expressionsOnListUI; }
/** * Method to obtain the list of types that will be used to populate the content on the artifact * list UI. * * @return the list of types that will be used to populate the content on the artifact list UI. */ public String[] getTypesOnListUI() { String[] typesOnListUI = new String[listConfigurations.length]; for (int i = 0; i < listConfigurations.length; i++) { typesOnListUI[i] = listConfigurations[i].getType(); } return typesOnListUI; }
/** * Method to obtain the list of names that will be displayed on the artifact list UI. * * @return the list of names that will be displayed on the artifact list UI. */ public String[] getNamesOnListUI() { String[] namesOnListUI = new String[listConfigurations.length]; for (int i = 0; i < listConfigurations.length; i++) { namesOnListUI[i] = listConfigurations[i].getName(); } return namesOnListUI; }
/** * Method to obtain the list of keys that will be used to generate the artifact list UI. * * @return the list of keys that will be used to generate the artifact list UI. */ public String[] getKeysOnListUI() { String[] keysOnListUI = new String[listConfigurations.length]; for (int i = 0; i < listConfigurations.length; i++) { keysOnListUI[i] = listConfigurations[i].getKey(); } return keysOnListUI; }