if (fragmentProperty.getName().equals(propName)) String fragmentPropertyScope = fragmentProperty.getScope(); if ((fragmentPropertyScope == null) && (scope == null)) return fragmentProperty.getValue(); String fragmentPropertyScopeValue = fragmentProperty.getScopeValue(); if (((fragmentPropertyScopeValue == null) && (scopeValue == null)) || ((fragmentPropertyScopeValue != null) && fragmentPropertyScopeValue.equals(scopeValue))) return fragmentProperty.getValue();
fragmentProperty.setName(propName); fragmentProperty.setScope(propScope); fragmentProperty.setScopeValue(propScopeValue); fragmentProperty.setValue(propValue); propertyImpls.add(fragmentProperty); fragmentProperty.setValue(propValue);
/** * Test whether property object matches. * * @param other match candidate * @return match flag */ protected boolean match(FragmentProperty other) { return ((((name != null) && name.equals(other.getName())) || ((name == null) && (other.getName() == null))) && (((scope != null) && scope.equals(other.getScope())) || ((scope == null) && (other.getScope() == null))) && (((scopeValue != null) && scopeValue.equals(other.getScopeValue())) || ((scopeValue == null) && (other.getScopeValue() == null)))); } }
if (fragmentProperty.getName().equals(propName)) String fragmentPropertyScope = fragmentProperty.getScope(); if (fragmentPropertyScope != null) userValue = fragmentProperty.getValue(); groupValue = fragmentProperty.getValue(); roleValue = fragmentProperty.getValue(); globalValue = fragmentProperty.getValue();
for (FragmentProperty fragmentProperty : properties) String fragmentPropertyScope = fragmentProperty.getScope(); if (fragmentPropertyScope != null) String fragmentPropertyScopeValue = fragmentProperty.getScopeValue(); if (userPrincipal != null)
if (fragmentProperty != null) return fragmentProperty.getValue();
public Map<String,String> getPropertiesMap() { // get property names Set<String> propertyNames = new HashSet<String>(); Iterator propertiesIter = getProperties().iterator(); while (propertiesIter.hasNext()) { FragmentProperty fragmentProperty = (FragmentProperty)propertiesIter.next(); propertyNames.add(fragmentProperty.getName()); } // construct and return properties map Map<String,String> propertiesMap = new HashMap<String,String>(); Iterator propertyNamesIter = propertyNames.iterator(); while (propertyNamesIter.hasNext()) { String propertyName = (String)propertyNamesIter.next(); String propertyValue = getProperty(propertyName); if (propertyValue != null) { propertiesMap.put(propertyName, propertyValue); } } return propertiesMap; }
public synchronized void add(int index, FragmentProperty element) { // implement for modifiable AbstractList: FragmentPropertyImpl add = (FragmentPropertyImpl)element; if ((add.getName() == null) || (add.getValue() == null)) { throw new IllegalArgumentException("Property name and value must be set."); } // find existing matching property FragmentProperty addMatch = getMatchingProperty(add); if (addMatch != null) { // modify existing property addMatch.setValue(add.getValue()); } else { // try to recycle removed properties add = recycleProperty(add); // add new property properties.add(index, add); } }
for (FragmentProperty findFragmentProperty : properties) if (findFragmentProperty.getName().equals(propName)) String findFragmentPropertyScope = findFragmentProperty.getScope(); if ((propScope == null) && (findFragmentPropertyScope == null)) String findFragmentPropertyScopeValue = findFragmentProperty.getScopeValue(); if ((findFragmentPropertyScopeValue != null) && findFragmentPropertyScopeValue.equals(propScopeValue))
String propertyScope = property.getScope(); String propertyScopeValue = property.getScopeValue(); if (updateAllScopes || ((scope == null) && (propertyScope == null)) || ((scope != null) && scope.equals(propertyScope))) String storePropertyScope = storeProperty.getScope(); String storePropertyScopeValue = storeProperty.getScopeValue(); if (updateAllScopes || ((scope == null) && (storePropertyScope == null)) || ((scope != null) && scope.equals(storePropertyScope))) String deletePropertyScope = deleteProperty.getScope(); String deletePropertyScopeValue = deleteProperty.getScopeValue(); if (updateAllScopes || ((scope == null) && (deletePropertyScope == null)) || ((scope != null) && scope.equals(deletePropertyScope)))
public int getIntProperty(String propName, String propScope, String propScopeValue) { // lookup global property value members if (propScope == null) { if (ROW_PROPERTY_NAME.equals(propName)) { return layoutRowProperty; } else if (COLUMN_PROPERTY_NAME.equals(propName)) { return layoutColumnProperty; } } // default user scope value if ((propScope != null) && propScope.equals(USER_PROPERTY_SCOPE) && (propScopeValue == null)) { propScopeValue = FragmentPropertyImpl.getCurrentUserScopeValue(); } // find specified scoped property value FragmentProperty fragmentProperty = FragmentPropertyImpl.findFragmentProperty(propName, propScope, propScopeValue, getProperties()); if (fragmentProperty != null) { return Integer.parseInt(fragmentProperty.getValue()); } return -1; }
public synchronized FragmentProperty set(int index, FragmentProperty element) { // implement for modifiable AbstractList: FragmentPropertyImpl set = (FragmentPropertyImpl)element; if ((set.getName() == null) || (set.getValue() == null)) { throw new IllegalArgumentException("Property name and value must be set."); } // find existing matching property FragmentProperty setMatch = getMatchingProperty(set); if (setMatch != null) { // modify existing property setMatch.setValue(set.getValue()); // remove property if not matching if (properties.get(index) != setMatch) { return remove(index); } return null; } else { // try to recycle removed properties set = recycleProperty(set); // replace property FragmentPropertyImpl replaced = (FragmentPropertyImpl)properties.set(index, set); return removedProperty(replaced); } }
if (fragmentProperty.getName().equals(propName)) String fragmentPropertyScope = fragmentProperty.getScope(); if (fragmentPropertyScope != null) String fragmentPropertyScopeValue = fragmentProperty.getScopeValue(); if (userPrincipal != null) userValue[0] = fragmentProperty.getValue(); valueFound = true; userValue[0] = fragmentProperty.getValue(); valueFound = true; groupValue[0] = fragmentProperty.getValue(); valueFound = true; roleValue[0] = fragmentProperty.getValue(); valueFound = true; globalValue[0] = fragmentProperty.getValue(); valueFound = true;
if (findFragmentProperty.getName().equals(propName)) String findFragmentPropertyScope = findFragmentProperty.getScope(); if ((scope == null) && (findFragmentPropertyScope == null)) String findFragmentPropertyScopeValue = findFragmentProperty.getScopeValue(); if ((findFragmentPropertyScopeValue != null) && findFragmentPropertyScopeValue.equals(scopeValue))
fragmentProperty.setName(propName); fragmentProperty.setScope(propScope); fragmentProperty.setScopeValue(propScopeValue); fragmentProperty.setValue(propValue); getProperties().add(fragmentProperty); fragmentProperty.setValue(propValue);
if (fragmentProperty != null) return Float.parseFloat(fragmentProperty.getValue());
String name = fragmentProperty.getName(); String scope = fragmentProperty.getScope(); String scopeValue = fragmentProperty.getScopeValue(); Iterator scanPropertiesIter = contentFragmentImpl.getProperties().iterator(); while (!foundProperty && scanPropertiesIter.hasNext()) String scanName = scanFragmentProperty.getName(); if (name.equals(scanName)) String scanScope = scanFragmentProperty.getScope(); if ((scope == null) && (scanScope == null)) String scanScopeValue = scanFragmentProperty.getScopeValue(); foundProperty = ((scopeValue != null) && scopeValue.equals(scanScopeValue)); contentFragmentImpl.getProperties().add(new ContentFragmentPropertyImpl(name, scope, scopeValue, fragmentProperty.getValue()));
if (fragmentProperty != null) return fragmentProperty.getValue();
String propName = prop.getName(); String propScope = prop.getScope(); String propScopeValue = prop.getScopeValue(); if (FragmentProperty.GROUP_AND_ROLE_PROPERTY_SCOPES_ENABLED || (propScope == null) || copy.setProperty(propName, propScope, propScopeValue, prop.getValue());