Revision 33399 branches/v2_0_0_prep/applications/appgvSIG/src/org/gvsig/app/project/DefaultProject.java
DefaultProject.java | ||
---|---|---|
527 | 527 |
} |
528 | 528 |
} |
529 | 529 |
|
530 |
public void saveState(File out) { |
|
530 |
public void saveState(File out) throws PersistenceException {
|
|
531 | 531 |
FileOutputStream fout; |
532 | 532 |
try { |
533 | 533 |
fout = new FileOutputStream(out); |
534 | 534 |
saveState(fout, new File(out.getParent())); |
535 | 535 |
} catch (FileNotFoundException e) { |
536 |
// TODO Auto-generated catch block |
|
537 |
e.printStackTrace(); |
|
536 |
throw new PersistenceException(e); |
|
538 | 537 |
} |
539 | 538 |
} |
540 | 539 |
|
541 |
public void saveState(OutputStream out) { |
|
540 |
public void saveState(OutputStream out) throws PersistenceException {
|
|
542 | 541 |
saveState(out, null); |
543 | 542 |
} |
544 | 543 |
|
545 |
public void saveState(OutputStream out, File rootFolder) { |
|
544 |
public void saveState(OutputStream out, File rootFolder) throws PersistenceException {
|
|
546 | 545 |
PersistenceManager manager = ToolsLocator.getPersistenceManager(); |
547 |
try { |
|
548 | 546 |
PersistentState state = manager.getState(this); |
549 | 547 |
if( rootFolder!=null ) { |
550 | 548 |
relativizeFiles(state, rootFolder); |
551 | 549 |
} |
552 | 550 |
manager.saveState( state, out); |
553 |
} catch (PersistenceTypeNotSupportedException e) { |
|
554 |
LOG.warn("Can't save state of project.",e); |
|
555 |
} catch (PersistenceClassNotRegistered e) { |
|
556 |
LOG.warn("Can't save state of project.",e); |
|
557 |
} catch (PersistenceException e) { |
|
558 |
LOG.warn("Can't save state of project.",e); |
|
559 |
} catch (PersistenceValidateExceptions e) { |
|
560 |
LOG.warn("Can't save state of project.",e); |
|
561 |
} |
|
562 | 551 |
} |
563 | 552 |
|
564 | 553 |
private void relativizeFiles(PersistentState state, File rootFolder) { |
... | ... | |
666 | 655 |
} |
667 | 656 |
} |
668 | 657 |
} |
669 |
state.set("windowsInformation", windowsStates); |
|
658 |
LOG.warn("DefaultProject::saveToState, falta por persistir 'windowsInformation'"); |
|
659 |
//state.set("windowsInformation", windowsStates); |
|
670 | 660 |
|
671 | 661 |
} |
672 | 662 |
|
Also available in: Unified diff