示例#1
0
 @Override
 public String[] unparse(LoadContext context, KitDeity kitDeity) {
   Collection<CDOMSingleRef<Domain>> domains = kitDeity.getDomains();
   if (domains == null || domains.isEmpty()) {
     return null;
   }
   return new String[] {ReferenceUtilities.joinLstFormat(domains, Constants.PIPE)};
 }
示例#2
0
 @Override
 protected ParseResult parseTokenWithSeparator(
     LoadContext context, KitDeity kitDeity, String value) {
   StringTokenizer pipeTok = new StringTokenizer(value, Constants.PIPE);
   while (pipeTok.hasMoreTokens()) {
     String tokString = pipeTok.nextToken();
     CDOMSingleRef<Domain> ref =
         context.getReferenceContext().getCDOMReference(DOMAIN_CLASS, tokString);
     kitDeity.addDomain(ref);
   }
   return ParseResult.SUCCESS;
 }