Advertisement
Guest User

Untitled

a guest
Nov 30th, 2015
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. public class AlbumServiceBean {
  2. public AlbumDTO getAlbum(String id) throws RemoteException {
  3. return new AlbumAssebmler().writeDTO(Registry.findAlbum(id));
  4. }
  5. public String getAlbumXml(String id) throws RemoteException {
  6. AlbumDTO dto = new AlbumAssembler().writeDTO(Registry.findAlbum(id));
  7. return dto.toXmlString();
  8. }
  9. public void createAlbum(String id, AlbumDTO dto) throws RemoteException {
  10. new AlbumAssembler().createAlbum(id, dto);
  11. }
  12. public void createAlbum(String id, String xml) throws RemoteException {
  13. AlbumDTO dto = AlbumDTO.readXmlString(xml);
  14. new AlbumAssembler().createAlbum(id, dto);
  15. }
  16. public void updateAlbum(String id, AlbumDTO dto) throws RemoteException {
  17. new AlbumAssembler().updateAlbum(id, dto);
  18. }
  19. public void updateAlbum(String id, String xml) throws RemoteException {
  20. AlbumDTO dto = AlbumDTO.readXmlString(xml);
  21. new AlbumAssembler().updateAlbum(id, dto);
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement