Пример #1
0
 public static RemotePlugin unmarshal(String row) {
   String[] fields = StringUtils.split(row, ",");
   RemotePlugin result = new RemotePlugin(fields[0]);
   if (fields.length >= 2) {
     String[] nameAndHash = StringUtils.split(fields[1], "|");
     result.setFile(nameAndHash[0], nameAndHash[1]);
   }
   return result;
 }
Пример #2
0
 public static RemotePlugin create(PluginInfo pluginInfo) {
   RemotePlugin result = new RemotePlugin(pluginInfo.getKey());
   result.setFile(pluginInfo.getNonNullJarFile());
   return result;
 }