FreeRDP
PlaceholderBookmark.java
1 /*
2  Placeholder for bookmark items with a special purpose (i.e. just displaying some text)
3 
4  Copyright 2013 Thincast Technologies GmbH, Author: Martin Fleisz
5 
6  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
7  If a copy of the MPL was not distributed with this file, You can obtain one at
8  http://mozilla.org/MPL/2.0/.
9 */
10 
11 package com.freerdp.freerdpcore.domain;
12 
13 import android.content.SharedPreferences;
14 import android.os.Parcel;
15 import android.os.Parcelable;
16 
17 public class PlaceholderBookmark extends BookmarkBase
18 {
19 
20  public static final Parcelable.Creator<PlaceholderBookmark> CREATOR =
21  new Parcelable.Creator<PlaceholderBookmark>() {
22  public PlaceholderBookmark createFromParcel(Parcel in)
23  {
24  return new PlaceholderBookmark(in);
25  }
26 
27  @Override public PlaceholderBookmark[] newArray(int size)
28  {
29  return new PlaceholderBookmark[size];
30  }
31  };
32  private String name;
33 
34  public PlaceholderBookmark(Parcel parcel)
35  {
36  super(parcel);
37  type = TYPE_PLACEHOLDER;
38  name = parcel.readString();
39  }
40 
41  public PlaceholderBookmark()
42  {
43  super();
44  type = TYPE_PLACEHOLDER;
45  name = "";
46  }
47 
48  public String getName()
49  {
50  return name;
51  }
52 
53  public void setName(String name)
54  {
55  this.name = name;
56  }
57 
58  @Override public int describeContents()
59  {
60  return 0;
61  }
62 
63  @Override public void writeToParcel(Parcel out, int flags)
64  {
65  super.writeToParcel(out, flags);
66  out.writeString(name);
67  }
68 
69  @Override public void writeToSharedPreferences(SharedPreferences sharedPrefs)
70  {
71  super.writeToSharedPreferences(sharedPrefs);
72  }
73 
74  @Override public void readFromSharedPreferences(SharedPreferences sharedPrefs)
75  {
76  super.readFromSharedPreferences(sharedPrefs);
77  }
78 
79  // Cloneable
80  public Object clone()
81  {
82  return super.clone();
83  }
84 }