/** * Performs a deep copy of {@link ServiceLinkInfo} object. * * @param destServiceLinkInfo ServiceLinkInfo object to copy this object into. It cannot be null. * * @return UPA return value indicating success or failure of copy operation. */ public int copy(ServiceLinkInfo destServiceLinkInfo) { assert (destServiceLinkInfo != null) : "destServiceLinkInfo can not be null"; destServiceLinkInfo.clear(); destServiceLinkInfo.action(action()); int ret = CodecReturnCodes.SUCCESS; for (ServiceLink serviceLink : linkList()) { ServiceLink serviceLink2 = new ServiceLink(); ret = serviceLink.copy(serviceLink2); if (ret != CodecReturnCodes.SUCCESS) return ret; destServiceLinkInfo.linkList().add(serviceLink2); } return ret; }
_service.link().action(FilterEntryActions.SET);
_service.link().action(FilterEntryActions.SET);
service.link().action(FilterEntryActions.SET);
_service.link().action(FilterEntryActions.SET);
linkList.action(FilterEntryActions.SET); linkList.linkList().add(rdmServiceLink);
case Directory.ServiceFilterIds.LINK: ServiceLinkInfo linkFilter = link(); linkFilter.action(filterEntry.action()); applyHasLink(); if (filterEntry.action() != FilterEntryActions.CLEAR)
respService.link().action(FilterEntryActions.SET);
if (rdmService.checkHasLink() && rdmService.link().action() != FilterEntryActions.CLEAR)
private void buildRDMServiceLink(Service.ServiceLinkInfo serviceLinkInfo, int action) { int flags = Service.ServiceLinkFlags.HAS_CODE | Service.ServiceLinkFlags.HAS_TEXT | Service.ServiceLinkFlags.HAS_TYPE; long linkCode = 1; long linkState = 1; long type = DataTypes.ASCII_STRING; Service.ServiceLink serviceLink = new Service.ServiceLink(); serviceLinkInfo.linkList().add(serviceLink); serviceLinkInfo.action(action); serviceLink.clear(); serviceLink.action(MapEntryActions.ADD); serviceLink.flags(flags); serviceLink.name().data("name"); serviceLink.linkState(linkState); if (serviceLink.checkHasCode()) { serviceLink.linkCode(linkCode); } if (serviceLink.checkHasText()) { serviceLink.text().data("text"); } if (serviceLink.checkHasType()) { serviceLink.type(type); } }
/** * Performs a deep copy of {@link ServiceLinkInfo} object. * * @param destServiceLinkInfo ServiceLinkInfo object to copy this object into. It cannot be null. * * @return UPA return value indicating success or failure of copy operation. */ public int copy(ServiceLinkInfo destServiceLinkInfo) { assert (destServiceLinkInfo != null) : "destServiceLinkInfo can not be null"; destServiceLinkInfo.clear(); destServiceLinkInfo.action(action()); int ret = CodecReturnCodes.SUCCESS; for (ServiceLink serviceLink : linkList()) { ServiceLink serviceLink2 = new ServiceLink(); ret = serviceLink.copy(serviceLink2); if (ret != CodecReturnCodes.SUCCESS) return ret; destServiceLinkInfo.linkList().add(serviceLink2); } return ret; }
private int encodeLinkFilter(EncodeIterator encIter) { filterEntry.action(link().action()); filterEntry.containerType(DataTypes.MAP); filterEntry.applyHasContainerType(); if (filterEntry.action() == FilterEntryActions.CLEAR) return filterEntry.encode(encIter); int ret = filterEntry.encodeInit(encIter, 0); if (ret != CodecReturnCodes.SUCCESS) return ret; ret = link().encode(encIter); if (ret != CodecReturnCodes.SUCCESS) return ret; return filterEntry.encodeComplete(encIter, true); }