| 60 | } |
| 61 | |
| 62 | @Override |
| 63 | protected boolean run() { |
| 64 | if(!init(context)) return error(error); |
| 65 | |
| 66 | final StringBuilder sb = new StringBuilder(); |
| 67 | for(final Command cmd : commands) { |
| 68 | if(cmd.openDB && context.data() == null) return error(NO_DB_OPENED); |
| 69 | try { |
| 70 | final boolean ok = pushJob(cmd).run(context, out); |
| 71 | sb.append(cmd.info()); |
| 72 | if(!ok) { |
| 73 | exception = cmd.exception; |
| 74 | return error(sb.toString()); |
| 75 | } |
| 76 | } finally { |
| 77 | popJob(); |
| 78 | } |
| 79 | } |
| 80 | return info(sb.toString().replaceAll("\r?\n?$", "")); |
| 81 | } |
| 82 | |
| 83 | @Override |
| 84 | public final boolean updating(final Context ctx) { |