| | |
| | | import de.hsadmin.core.model.AbstractEntity; |
| | | import de.hsadmin.core.model.AnnFieldIO; |
| | | import de.hsadmin.core.model.AuthenticationException; |
| | | import de.hsadmin.core.model.DefaultSelectableValues; |
| | | import de.hsadmin.core.model.HSAdminException; |
| | | import de.hsadmin.core.model.ReadWriteAccess; |
| | | import de.hsadmin.core.model.SelectableValue; |
| | | import de.hsadmin.core.model.Transaction; |
| | | import de.hsadmin.core.model.KindOfSelectableValue; |
| | | |
| | | public class ModulePropertiesRemote implements IRemote { |
| | | |
| | |
| | | propertyProperties.put("rw", rw.name()); |
| | | String[] referredProps = fieldIO.referredProps(); |
| | | propertyProperties.put("referredProps", referredProps); |
| | | // Class<?> declaringClass = f.getDeclaringClass(); |
| | | // declaringClass = f.getDeclaringClass(); |
| | | for(String s : referredProps) { |
| | | String fullPropertyName = fieldName+"."+s; |
| | | propertiesList.add(createReferredPropertyInfo(fullPropertyName, f, s)); |
| | | } |
| | | DefaultSelectableValues selectableValuesInstance = fieldIO.selectableValues().newInstance() ; |
| | | KindOfSelectableValue kind = selectableValuesInstance.getkind(); |
| | | HashMap<String,Object> kindMap = new HashMap<String,Object>(); |
| | | kindMap.put("kind", kind.name()); |
| | | switch (kind) { |
| | | case UNSPECIFIED : |
| | | break; |
| | | case SINGLESTRING : |
| | | propertyProperties.put("selectableValues", kindMap); |
| | | // ArrayList<Map<String,String>> selectableValueslist = new ArrayList<Map<String,String>>(); |
| | | // kindMap.put("values", selectableValueslist); |
| | | // List<SelectableValue> selectableValues = selectableValuesInstance.get(); |
| | | // TODO: Hier fehlt noch was! |
| | | break; |
| | | case DOMAINOPTIONS : |
| | | propertyProperties.put("selectableValues", kindMap); |
| | | ArrayList<Map<String,Object>> selectableValueslist = new ArrayList<Map<String,Object>>(); |
| | | List<SelectableValue> selectableValues = fieldIO.selectableValues().newInstance().get(); |
| | | propertyProperties.put("selectableValues", selectableValueslist); |
| | | kindMap.put("values", selectableValueslist); |
| | | List<SelectableValue> selectableValues = selectableValuesInstance.get(); |
| | | for( SelectableValue s : selectableValues) { |
| | | String SelectableValueName = s.getName(); |
| | | Object SelectableValues = s.getValues(); |
| | |
| | | m.put(SelectableValueName, SelectableValues); |
| | | selectableValueslist.add(m); |
| | | } |
| | | break; |
| | | } |
| | | addCommonPropertyInfo(propertyProperties, f); |
| | | propertiesList.add(propertyProperties); |
| | | } |