Пример #1
0
  private Set getAttributeSchemas(SchemaType type) throws SMSException {
    Set results = null;
    ServiceSchema schema = svcSchemaManager.getSchema(type);

    if (schema != null) {
      Set attributes = schema.getAttributeSchemas();

      if ((attributes != null) && !attributes.isEmpty()) {
        results = new HashSet(attributes.size() * 2);
        for (Iterator iter = attributes.iterator(); iter.hasNext(); ) {
          AttributeSchema as = (AttributeSchema) iter.next();
          String i18nKey = as.getI18NKey();

          if ((i18nKey != null) && (i18nKey.trim().length() > 0)) {
            results.add(as);
          }
        }
      }
    }

    return results;
  }
Пример #2
0
 private boolean shouldBeIgnored(String attributeName) {
   final AttributeSchema attributeSchema = schema.getAttributeSchema(attributeName);
   return attributeSchema == null
       || StringUtils.isBlank(attributeSchema.getI18NKey())
       || hiddenAttributeNames.contains(attributeName);
 }