cn.teleinfo.idpointer.sdk.core.ModifyValueRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of id-pointer-sdk Show documentation
Show all versions of id-pointer-sdk Show documentation
基于Java语言开发的工业互联网标识解析体系客户端软件开发工具包,应用通过集成 id-pointer-sdk,快速对接标识解析、标识注册、标识维护等功能服务。
The newest version!
/**********************************************************************\
© COPYRIGHT 2019 Corporation for National Research Initiatives (CNRI);
All rights reserved.
The HANDLE.NET software is made available subject to the
Handle.Net Public License Agreement, which may be obtained at
http://hdl.handle.net/20.1000/112 or hdl:20.1000/112
\**********************************************************************/
package cn.teleinfo.idpointer.sdk.core;
/******************************************************************************
* Request used to modify a value of an existing handle. Holds the handle
* as well as the value to be modified. The value that will be modified
* on the server is the one that has the same ID as the value in this
* message.
******************************************************************************/
public class ModifyValueRequest extends AbstractRequest {
public HandleValue values[];
public ModifyValueRequest(byte handle[], HandleValue value, AuthenticationInfo authInfo) {
this(handle, new HandleValue[] { value }, authInfo);
}
public ModifyValueRequest(byte handle[], HandleValue values[], AuthenticationInfo authInfo) {
super(handle, AbstractMessage.OC_MODIFY_VALUE, authInfo);
this.values = values;
this.isAdminRequest = true;
}
@Override
public boolean shouldEncrypt() {
if (!hasEqualOrGreaterVersion(2, 8)) return false;
if (values == null) return false;
for (HandleValue value : values) {
if (!value.publicRead) return true;
}
return false;
}
}