SyncAgentImpl.java
1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.cq.dam.mac.sync.impl;
import com.adobe.cq.dam.mac.sync.api.SyncAgent;
public class SyncAgentImpl
implements SyncAgent {
private String name;
private String type;
private String protocolHTTPMethod;
private String slingResourceType;
private String cqTemplate;
public SyncAgentImpl(String type, String httpMethod, String slingResourceType, String cqTemplate) {
this.type = type;
this.protocolHTTPMethod = httpMethod;
this.slingResourceType = slingResourceType;
this.cqTemplate = cqTemplate;
this.name = "MAC Sync Replication Agent " + this.type;
}
public SyncAgentImpl(String type, String httpMethod, String slingResourceType, String cqTemplate, String nameHint) {
this.type = type;
this.protocolHTTPMethod = httpMethod;
this.slingResourceType = slingResourceType;
this.cqTemplate = cqTemplate;
this.name = nameHint + " " + this.type;
}
@Override
public String getName() {
return this.name;
}
@Override
public String getType() {
return this.type;
}
@Override
public String getProtocolHTTPMethod() {
return this.protocolHTTPMethod;
}
@Override
public String getSlingResourceType() {
return this.slingResourceType;
}
@Override
public String getCqTemplate() {
return this.cqTemplate;
}
@Override
public String getAgentNameForTenant(String tenant) {
String agentName = this.getName() + " " + tenant;
return agentName.replaceAll(" ", "_").toLowerCase();
}
}