25.02.2015 Views

Introducing Spring Framework

Introducing Spring Framework

Introducing Spring Framework

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 3 ■ Applying Different Configurations<br />

public MyDocumentsContext(){<br />

Type type = new Type();<br />

type.setName("PDF");<br />

type.setDesc("Portable Document Format");<br />

type.setExtension(".pdf");<br />

Document document = new Document();<br />

document.setName("Book Template");<br />

document.setType(type);<br />

document.setLocation("/Users/felipeg/Documents/Random/Book Template.pdf");<br />

documents.put("doc1", document);<br />

types.put("pdf",type);<br />

document = new Document();<br />

document.setName("Sample Contract");<br />

document.setType(type);<br />

document.setLocation("/Users/felipeg/Documents/Contracts/Sample Contract.pdf");<br />

documents.put("doc2",document);<br />

type = new Type();<br />

type.setName("NOTE");<br />

type.setDesc("Text Notes");<br />

type.setExtension(".txt");<br />

document = new Document();<br />

document.setName("Clustering with RabbitMQ");<br />

document.setType(type);<br />

document.setLocation("/Users/felipeg/Documents/Random/Clustering with RabbitMQ.txt");<br />

documents.put("doc3",document);<br />

types.put("note",type);<br />

type = new Type();<br />

type.setName("WEB");<br />

type.setDesc("Web Link");<br />

type.setExtension(".url");<br />

document = new Document();<br />

document.setName("Pro <strong>Spring</strong> Security Book");<br />

document.setType(type);<br />

document.setLocation("http://www.apress.com/9781430248187");<br />

}<br />

documents.put("doc4",document);<br />

types.put("web",type);<br />

38

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!