use of alluxio.security.authorization.AclAction in project alluxio by Alluxio.
the class ProtoUtils method toProto.
/**
* @param aclEntry the acl entry
* @return the proto representation of instance
*/
public static Acl.AclEntry toProto(AclEntry aclEntry) {
Acl.AclEntry.Builder builder = Acl.AclEntry.newBuilder();
builder.setType(toProto(aclEntry.getType()));
builder.setSubject(aclEntry.getSubject());
builder.setIsDefault(aclEntry.isDefault());
for (AclAction action : aclEntry.getActions().getActions()) {
builder.addActions(toProto(action));
}
return builder.build();
}
use of alluxio.security.authorization.AclAction in project alluxio by Alluxio.
the class GrpcUtils method toProto.
/**
* @param aclEntry the acl entry to convert
* @return the proto representation of AclEntry instance
*/
public static PAclEntry toProto(AclEntry aclEntry) {
PAclEntry.Builder pAclEntry = PAclEntry.newBuilder();
pAclEntry.setType(toProto(aclEntry.getType()));
pAclEntry.setSubject(aclEntry.getSubject());
pAclEntry.setIsDefault(aclEntry.isDefault());
for (AclAction action : aclEntry.getActions().getActions()) {
pAclEntry.addActions(toProto(action));
}
return pAclEntry.build();
}
use of alluxio.security.authorization.AclAction in project alluxio by Alluxio.
the class ProtoUtils method toProto.
/**
* @param actions the {@link AclActions}
* @return the protobuf representation of {@link AclActions}
*/
public static Acl.AclActions toProto(AclActions actions) {
Acl.AclActions.Builder builder = Acl.AclActions.newBuilder();
for (AclAction action : actions.getActions()) {
Acl.AclAction pAction = toProto(action);
builder.addActions(pAction);
}
return builder.build();
}
Aggregations