1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.exoplatform.social.core.activity.model;
18
19 import org.exoplatform.services.log.ExoLogger;
20 import org.exoplatform.services.log.Log;
21 import org.exoplatform.social.core.identity.provider.OrganizationIdentityProvider;
22 import org.exoplatform.social.core.identity.provider.SpaceIdentityProvider;
23
24
25
26
27 public class ActivityStreamImpl implements ActivityStream {
28
29
30
31
32 private static final Log LOG = ExoLogger.getLogger(ActivityStreamImpl.class);
33
34
35
36
37 private String id;
38
39
40
41
42
43 private String prettyId;
44
45
46
47
48 private Type type;
49
50
51
52
53 private String title;
54
55
56
57
58 private String faviconUrl;
59
60
61
62
63 private String permaLink;
64
65
66
67
68 public final void setType(final String name) {
69
70 if (name.equals(OrganizationIdentityProvider.NAME)) {
71 setType(Type.USER);
72 } else if (name.equals(SpaceIdentityProvider.NAME)) {
73 setType(Type.SPACE);
74 } else {
75 LOG.warn("Failed to set activity stream type with type:" + name);
76 }
77 }
78
79
80
81
82 public final String getId() {
83 return id;
84 }
85
86
87
88
89 public final void setId(final String uuid) {
90 this.id = uuid;
91 }
92
93
94
95
96 public final String getPrettyId() {
97 return prettyId;
98 }
99
100
101
102
103 public final void setPrettyId(final String sPrettyId) {
104 prettyId = sPrettyId;
105 }
106
107
108
109
110 public final Type getType() {
111 return type;
112 }
113
114
115
116
117 public final void setType(final Type sType) {
118 type = sType;
119 }
120
121
122
123
124 public final String getFaviconUrl() {
125 return faviconUrl;
126 }
127
128
129
130
131 public final void setFaviconUrl(final String sFaviconUrl) {
132 faviconUrl = sFaviconUrl;
133 }
134
135
136
137
138 public final String getTitle() {
139 return title;
140 }
141
142
143
144
145 public final void setTitle(final String sTitle) {
146 title = sTitle;
147 }
148
149
150
151
152 public final String getPermaLink() {
153 return permaLink;
154 }
155
156
157
158
159 public final void setPermaLink(final String sPermaLink) {
160 permaLink = sPermaLink;
161 }
162 }