e9913eb5fe359a1bb41408e740e5903b20ac0452
[staff/due1/sed-hs15-srs-purple.git] / src / main / java / ch / bfh / ti / srs / dataschema / Resource.java
1 /*
2 * Copyright (c) 2015 Berner Fachhochschule, Switzerland.
3 *
4 * Project Smart Reservation System.
5 *
6 * Distributable under GPL license. See terms of license at gnu.org.
7 */
8 package ch.bfh.ti.srs.dataschema;
9
10 public class Resource {
11
12 private String name;
13 private String type;
14
15 /**
16 * Normal constructor for new resources created in the UserController
17 *
18 * @param name
19 * @param type
20 * @throws Exception
21 */
22
23 public Resource(String name, String type) throws Exception{
24 if (name == null)
25 throw new IllegalArgumentException("Name must not be null");
26
27 this.name = name;
28 this.type = type;
29 }
30
31 public String getName() {
32 return name;
33 }
34
35 public String getType() {
36 return type;
37 }
38
39 public void setName(String name) {
40 this.name = name;
41 }
42
43 public void setType(String type) {
44 this.type = type;
45 }
46 }