View Javadoc
1   /******************************************************************************
2    * RestUser.java - Client facing domain object
3    * 
4    * BuckoVidLib - The BuckoSoft Video Library
5    * Copyright(c) 2014 - Dick Balaska
6    * 
7    */
8   package com.buckosoft.BuckoVidLib.domain.rest;
9   
10  import javax.xml.bind.annotation.XmlRootElement;
11  
12  import com.buckosoft.BuckoVidLib.web.ImageController;
13  
14  /** Client facing {@link com.buckosoft.BuckoVidLib.domain.User} object.<br>
15   * Strip down to just the fields we want to send.
16   * @author dick
17   * @since 2015-05-04
18   */
19  @XmlRootElement(name="User")
20  public class RestUser {
21  	private	String	username = "";
22  	private	boolean	admin = false;
23  	private	boolean	unrestricted = false;
24  	private	boolean	hideRestricted = false;
25  	private	int		backgroundFit = ImageController.bgFill;
26  	private	int		artShowFit = ImageController.bgFill;
27  	private	int		backgroundDelay = 30;
28  	private	int		artShowDelay = 10;
29  	private	int		findMaxResults = 40;
30  
31  	/** Get the name of this User
32  	 * @return the username
33  	 */
34  	public String getUsername() {
35  		return username;
36  	}
37  	/** Set the name of this User
38  	 * @param username the username to set
39  	 */
40  	public void setUsername(String username) {
41  		this.username = username;
42  	}
43  	/** Does this User have admin privileges?
44  	 * @return the admin
45  	 */
46  	public boolean isAdmin() {
47  		return admin;
48  	}
49  	/**
50  	 * @param admin the admin to set
51  	 */
52  	public void setAdmin(boolean admin) {
53  		this.admin = admin;
54  	}
55  	/** Can this User browse the restricted sections of the Library?  (Nicholas Flamel is not in there)
56  	 * @return the unrestricted
57  	 */
58  	public boolean isUnrestricted() {
59  		return unrestricted;
60  	}
61  	/**
62  	 * @param unrestricted the unrestricted to set
63  	 */
64  	public void setUnrestricted(boolean unrestricted) {
65  		this.unrestricted = unrestricted;
66  	}
67  	
68  	/** Even though this user has access to the Restricted Sections, does he wish to avert his eyes?
69  	 * @return the hideRestricted
70  	 */
71  	public boolean isHideRestricted() {
72  		return hideRestricted;
73  	}
74  	/**
75  	 * @param hideRestricted the hideRestricted to set
76  	 */
77  	public void setHideRestricted(boolean hideRestricted) {
78  		this.hideRestricted = hideRestricted;
79  	}
80  	/** Get the User's preferred background fit as defined in {@link com.buckosoft.BuckoVidLib.web.ImageController}
81  	 * @return the backgroundFit
82  	 */
83  	public int getBackgroundFit() {
84  		return backgroundFit;
85  	}
86  	/**
87  	 * @param backgroundFit the backgroundFit to set
88  	 */
89  	public void setBackgroundFit(int backgroundFit) {
90  		this.backgroundFit = backgroundFit;
91  	}
92  	/**
93  	 * @return the artShowFit
94  	 */
95  	public int getArtShowFit() {
96  		return artShowFit;
97  	}
98  	/**
99  	 * @param artShowFit the artShowFit to set
100 	 */
101 	public void setArtShowFit(int artShowFit) {
102 		this.artShowFit = artShowFit;
103 	}
104 	/**
105 	 * @return the backgroundDelay
106 	 */
107 	public int getBackgroundDelay() {
108 		return backgroundDelay;
109 	}
110 	/**
111 	 * @param backgroundDelay the backgroundDelay to set
112 	 */
113 	public void setBackgroundDelay(int backgroundDelay) {
114 		this.backgroundDelay = backgroundDelay;
115 	}
116 	/** How many seconds to delay between flips when running the ArtShow
117 	 * @return the artShowDelay
118 	 */
119 	public int getArtShowDelay() {
120 		return artShowDelay;
121 	}
122 	/**
123 	 * @param artShowDelay the artShowDelay to set
124 	 */
125 	public void setArtShowDelay(int artShowDelay) {
126 		this.artShowDelay = artShowDelay;
127 	}
128 	/** Maximum number of results returned in a Find
129 	 * @return the findMaxResults
130 	 */
131 	public int getFindMaxResults() {
132 		return findMaxResults;
133 	}
134 	/**
135 	 * @param findMaxResults the findMaxResults to set
136 	 */
137 	public void setFindMaxResults(int findMaxResults) {
138 		this.findMaxResults = findMaxResults;
139 	}
140 }