正在查看: 管控平台 v5.2.3.0. 应用的 o.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 管控平台 v5.2.3.0. 应用的 o.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.obs.services.internal;
import com.obs.services.model.EventTypeEnum;
import com.obs.services.model.GroupGranteeEnum;
import com.obs.services.model.PartEtag;
import com.obs.services.model.StorageClassEnum;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerException;
import net.sqlcipher.BuildConfig;
public class o extends n {
private static c f1785a = new o();
class a implements Comparator<PartEtag> {
a(o oVar) {
}
@Override
public int compare(PartEtag partEtag, PartEtag partEtag2) {
if (partEtag == partEtag2) {
return 0;
}
if (partEtag == null) {
return -1;
}
if (partEtag2 == null) {
return 1;
}
return partEtag.getPartNumber().compareTo(partEtag2.getPartNumber());
}
}
static class b {
static final int[] f1786a;
static final int[] f1787b;
static final int[] f1788c;
static {
int[] iArr = new int[GroupGranteeEnum.values().length];
f1788c = iArr;
try {
iArr[GroupGranteeEnum.ALL_USERS.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
f1788c[GroupGranteeEnum.AUTHENTICATED_USERS.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
f1788c[GroupGranteeEnum.LOG_DELIVERY.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
int[] iArr2 = new int[StorageClassEnum.values().length];
f1787b = iArr2;
try {
iArr2[StorageClassEnum.STANDARD.ordinal()] = 1;
} catch (NoSuchFieldError unused4) {
}
try {
f1787b[StorageClassEnum.WARM.ordinal()] = 2;
} catch (NoSuchFieldError unused5) {
}
try {
f1787b[StorageClassEnum.COLD.ordinal()] = 3;
} catch (NoSuchFieldError unused6) {
}
int[] iArr3 = new int[EventTypeEnum.values().length];
f1786a = iArr3;
try {
iArr3[EventTypeEnum.OBJECT_CREATED_ALL.ordinal()] = 1;
} catch (NoSuchFieldError unused7) {
}
try {
f1786a[EventTypeEnum.OBJECT_CREATED_PUT.ordinal()] = 2;
} catch (NoSuchFieldError unused8) {
}
try {
f1786a[EventTypeEnum.OBJECT_CREATED_POST.ordinal()] = 3;
} catch (NoSuchFieldError unused9) {
}
try {
f1786a[EventTypeEnum.OBJECT_CREATED_COPY.ordinal()] = 4;
} catch (NoSuchFieldError unused10) {
}
try {
f1786a[EventTypeEnum.OBJECT_CREATED_COMPLETE_MULTIPART_UPLOAD.ordinal()] = 5;
} catch (NoSuchFieldError unused11) {
}
try {
f1786a[EventTypeEnum.OBJECT_REMOVED_ALL.ordinal()] = 6;
} catch (NoSuchFieldError unused12) {
}
try {
f1786a[EventTypeEnum.OBJECT_REMOVED_DELETE.ordinal()] = 7;
} catch (NoSuchFieldError unused13) {
}
try {
f1786a[EventTypeEnum.OBJECT_REMOVED_DELETE_MARKER_CREATED.ordinal()] = 8;
} catch (NoSuchFieldError unused14) {
}
}
}
protected o() {
}
public static c g() {
return f1785a;
}
@Override
public String a(List<PartEtag> list) throws ServiceException {
try {
com.jamesmurty.utils.b s = com.jamesmurty.utils.b.s("CompleteMultipartUpload");
Collections.sort(list, new a(this));
for (PartEtag partEtag : list) {
com.jamesmurty.utils.b u = s.u("Part").u("PartNumber");
u.A(partEtag.getPartNumber() == null ? BuildConfig.FLAVOR : partEtag.getPartNumber().toString());
u.D().u("ETag").A(com.obs.services.internal.utils.j.D(partEtag.getEtag()));
}
return s.a();
} catch (Exception e) {
throw new ServiceException(e);
}
}
@Override
public String b(com.obs.services.model.b bVar, boolean z) throws ServiceException {
com.obs.services.model.o f = bVar.f();
com.obs.services.model.g[] d = bVar.d();
try {
com.jamesmurty.utils.b s = com.jamesmurty.utils.b.s("AccessControlPolicy");
if (f != null) {
com.jamesmurty.utils.b v = s.v("Owner").v("ID");
v.B(com.obs.services.internal.utils.j.D(f.b()));
if (f.a() != null) {
v.D().v("DisplayName").B(f.a());
}
s = v.D().D();
}
if (d.length > 0) {
com.jamesmurty.utils.b v2 = s.v("AccessControlList");
for (com.obs.services.model.g gVar : d) {
com.obs.services.model.h a2 = gVar.a();
com.obs.services.model.p b2 = gVar.b();
com.jamesmurty.utils.b bVar2 = null;
if (a2 instanceof com.obs.services.model.c) {
bVar2 = e(a2);
} else if (a2 instanceof com.obs.services.model.i) {
bVar2 = f(a2);
} else if (a2 != null) {
com.jamesmurty.utils.b s2 = com.jamesmurty.utils.b.s("Grantee");
s2.q("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
s2.q("xsi:type", "CanonicalUser");
bVar2 = s2.w("ID");
bVar2.B(com.obs.services.internal.utils.j.D(a2.a()));
}
if (bVar2 != null) {
com.jamesmurty.utils.b v3 = v2.v("Grant");
v3.y(bVar2);
if (b2 != null) {
v3.v("Permission").B(com.obs.services.internal.utils.j.D(b2.a()));
}
}
}
}
return s.a();
} catch (ParserConfigurationException e) {
throw new ServiceException("Failed to build XML document for ACL", e);
} catch (TransformerException e2) {
throw new ServiceException("Failed to build XML document for ACL", e2);
} catch (Exception e3) {
throw new ServiceException("Failed to build XML document for ACL", e3);
}
}
@Override
public String c(GroupGranteeEnum groupGranteeEnum) {
if (groupGranteeEnum != null) {
int i = b.f1788c[groupGranteeEnum.ordinal()];
if (i == 1) {
return "http://acs.amazonaws.com/groups/global/AllUsers";
}
if (i == 2) {
return "http://acs.amazonaws.com/groups/global/AuthenticatedUsers";
}
if (i == 3) {
return "http://acs.amazonaws.com/groups/s3/LogDelivery";
}
}
return BuildConfig.FLAVOR;
}
@Override
public String d(StorageClassEnum storageClassEnum) {
if (storageClassEnum != null) {
int i = b.f1787b[storageClassEnum.ordinal()];
if (i == 1) {
return "STANDARD";
}
if (i == 2) {
return "STANDARD_IA";
}
if (i == 3) {
return "GLACIER";
}
}
return BuildConfig.FLAVOR;
}
}