• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Security类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.openbaton.catalogue.mano.common.Security的典型用法代码示例。如果您正苦于以下问题:Java Security类的具体用法?Java Security怎么用?Java Security使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Security类属于org.openbaton.catalogue.mano.common包,在下文中一共展示了Security类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getSecurity

import org.openbaton.catalogue.mano.common.Security; //导入依赖的package包/类
/**
 * Returns the Security into a NSD with id
 *
 * @param id : The id of NSD
 * @return Security: The Security of PhysicalNetworkFunctionDescriptor into NSD @
 */
@ApiOperation(value = "", notes = "", hidden = true)
@RequestMapping(
  value = "{id}/security",
  method = RequestMethod.GET,
  produces = MediaType.APPLICATION_JSON_VALUE
)
@ResponseStatus(HttpStatus.OK)
public Security getSecurity(
    @PathVariable("id") String id, @RequestHeader(value = "project-id") String projectId)
    throws NotFoundException {
  NetworkServiceDescriptor nsd = networkServiceDescriptorManagement.query(id, projectId);
  if (nsd == null)
    throw new NotFoundException("Did not find a Network Service Descriptor with ID " + id);
  return nsd.getNsd_security();
}
 
开发者ID:openbaton,项目名称:NFVO,代码行数:22,代码来源:RestNetworkServiceDescriptor.java


示例2: postSecurity

import org.openbaton.catalogue.mano.common.Security; //导入依赖的package包/类
/**
 * Stores the Security into NSD
 *
 * @param security : The Security to be stored
 * @param id : The id of NSD
 * @return Security: The Security stored @
 */
@ApiOperation(value = "", notes = "", hidden = true)
@RequestMapping(
  value = "{id}/security/",
  method = RequestMethod.POST,
  consumes = MediaType.APPLICATION_JSON_VALUE,
  produces = MediaType.APPLICATION_JSON_VALUE
)
@ResponseStatus(HttpStatus.CREATED)
public Security postSecurity(
    @RequestBody @Valid Security security,
    @PathVariable("id") String id,
    @RequestHeader(value = "project-id") String projectId)
    throws NotFoundException {
  return networkServiceDescriptorManagement.addSecurity(id, security, projectId);
}
 
开发者ID:openbaton,项目名称:NFVO,代码行数:23,代码来源:RestNetworkServiceDescriptor.java


示例3: init

import org.openbaton.catalogue.mano.common.Security; //导入依赖的package包/类
@Before
public void init() {
  MockitoAnnotations.initMocks(this);

  networkServiceDescriptor = new NetworkServiceDescriptor();
  networkServiceDescriptor.setVendor("Fokus");
  VirtualNetworkFunctionDescriptor virtualNetworkFunctionDescriptor =
      new VirtualNetworkFunctionDescriptor();
  virtualNetworkFunctionDescriptor.setVendor("Fokus");
  networkServiceDescriptor.getVnfd().add(virtualNetworkFunctionDescriptor);
  VNFDependency vnfdependency = new VNFDependency();
  networkServiceDescriptor.getVnf_dependency().add(vnfdependency);
  PhysicalNetworkFunctionDescriptor pDescriptor = new PhysicalNetworkFunctionDescriptor();
  networkServiceDescriptor.getPnfd().add(pDescriptor);
  Security security = new Security();
  networkServiceDescriptor.setNsd_security(security);
}
 
开发者ID:openbaton,项目名称:NFVO,代码行数:18,代码来源:ApiRestNSDescriptorTest.java


示例4: updateSecurity

import org.openbaton.catalogue.mano.common.Security; //导入依赖的package包/类
@Test
public void updateSecurity() {
  when(nsdManagement.query(anyString(), anyString())).thenReturn(networkServiceDescriptor);
  Security security = new Security();

  Security security_toUp = networkServiceDescriptor.getNsd_security();
  log.info("" + security_toUp);
  security_toUp = security;
  networkServiceDescriptor.setNsd_security(security_toUp);
  log.info("" + security);
  exception.expect(UnsupportedOperationException.class);
  assertEquals(
      security,
      restNetworkService.updateSecurity(
          security, networkServiceDescriptor.getId(), security_toUp.getId(), "pi"));
}
 
开发者ID:openbaton,项目名称:NFVO,代码行数:17,代码来源:ApiRestNSDescriptorTest.java


示例5: updateSecurity

import org.openbaton.catalogue.mano.common.Security; //导入依赖的package包/类
@ApiOperation(value = "", notes = "", hidden = true)
@RequestMapping(
  value = "{id}/security/{id_s}",
  method = RequestMethod.PUT,
  consumes = MediaType.APPLICATION_JSON_VALUE,
  produces = MediaType.APPLICATION_JSON_VALUE
)
@ResponseStatus(HttpStatus.ACCEPTED)
public Security updateSecurity(
    @RequestBody @Valid Security security,
    @PathVariable("id") String id,
    @PathVariable("id_s") String id_s,
    @RequestHeader(value = "project-id") String projectId) {
  throw new UnsupportedOperationException();
}
 
开发者ID:openbaton,项目名称:NFVO,代码行数:16,代码来源:RestNetworkServiceDescriptor.java


示例6: postSecurity

import org.openbaton.catalogue.mano.common.Security; //导入依赖的package包/类
@Test
public void postSecurity() throws NotFoundException {
  Security security = new Security();
  when(nsdManagement.addSecurity(anyString(), any(security.getClass()), anyString()))
      .thenReturn(security);
  Security security1 =
      restNetworkService.postSecurity(security, networkServiceDescriptor.getId(), "pi");
  assertEquals(security, security1);
}
 
开发者ID:openbaton,项目名称:NFVO,代码行数:10,代码来源:ApiRestNSDescriptorTest.java


示例7: getSecurity

import org.openbaton.catalogue.mano.common.Security; //导入依赖的package包/类
@Test
public void getSecurity() {
  when(nsdManagement.query(anyString(), anyString())).thenReturn(networkServiceDescriptor);
  Security security = networkServiceDescriptor.getNsd_security();
  /*assertEquals(security, restNetworkService.getSecurity(
            networkServiceDescriptor.getId(), networkServiceDescriptor
  .getNsd_security().getId()));*/
}
 
开发者ID:openbaton,项目名称:NFVO,代码行数:9,代码来源:ApiRestNSDescriptorTest.java


示例8: deleteSecurity

import org.openbaton.catalogue.mano.common.Security; //导入依赖的package包/类
@Test
public void deleteSecurity() throws NotFoundException {
  when(nsdManagement.query(anyString(), anyString())).thenReturn(networkServiceDescriptor);
  Security security = networkServiceDescriptor.getNsd_security();
  restNetworkService.deleteSecurity(networkServiceDescriptor.getId(), security.getId(), "pi");
  log.info("" + networkServiceDescriptor);
}
 
开发者ID:openbaton,项目名称:NFVO,代码行数:8,代码来源:ApiRestNSDescriptorTest.java


示例9: addSecurity

import org.openbaton.catalogue.mano.common.Security; //导入依赖的package包/类
@Override
@Transactional
public Security addSecurity(String id, Security security) {
  security = securityRepository.save(security);
  SimpleDateFormat format = new SimpleDateFormat("yyyy.MM.dd 'at' HH:mm:ss z");
  NetworkServiceDescriptor nsd = networkServiceDescriptorRepository.findFirstById(id);
  nsd.setUpdatedAt(format.format(new Date()));
  nsd.setNsd_security(security);
  return security;
}
 
开发者ID:openbaton,项目名称:NFVO,代码行数:11,代码来源:NetworkServiceDescriptorRepositoryImpl.java


示例10: deleteSecurity

import org.openbaton.catalogue.mano.common.Security; //导入依赖的package包/类
@Override
@Transactional
public void deleteSecurity(String id, String idS) {
  Security s = networkServiceDescriptorRepository.findFirstById(id).getNsd_security();
  if (s.getId().equals(securityRepository.findOne(idS).getId())) {
    SimpleDateFormat format = new SimpleDateFormat("yyyy.MM.dd 'at' HH:mm:ss z");
    NetworkServiceDescriptor nsd = networkServiceDescriptorRepository.findFirstById(id);
    nsd.setUpdatedAt(format.format(new Date()));
    nsd.setNsd_security(null);
    securityRepository.delete(idS);
  }
}
 
开发者ID:openbaton,项目名称:NFVO,代码行数:13,代码来源:NetworkServiceDescriptorRepositoryImpl.java


示例11: addSecurity

import org.openbaton.catalogue.mano.common.Security; //导入依赖的package包/类
/**
 * Adds or Updates the Security into NSD
 *
 * @return Security
 */
@Override
public Security addSecurity(String id, Security security, String projectId)
    throws NotFoundException {
  if (nsdRepository.findFirstByIdAndProjectId(id, projectId) == null)
    throw new NotFoundException("No NSD found with ID " + id);
  return nsdRepository.addSecurity(id, security);
}
 
开发者ID:openbaton,项目名称:NFVO,代码行数:13,代码来源:NetworkServiceDescriptorManagement.java


示例12: createVirtualLinkDescriptor

import org.openbaton.catalogue.mano.common.Security; //导入依赖的package包/类
private VirtualLinkDescriptor createVirtualLinkDescriptor() {
  VirtualLinkDescriptor virtualLinkDescriptor = new VirtualLinkDescriptor();
  virtualLinkDescriptor.setConnection(
      new HashSet<String>() {
        {
          add("connection1");
        }
      });
  virtualLinkDescriptor.setDescriptor_version("desc_version");
  virtualLinkDescriptor.setRoot_requirement("root_req");
  virtualLinkDescriptor.setNumber_of_endpoints(3);
  virtualLinkDescriptor.setVendor("vendor");
  virtualLinkDescriptor.setVld_security(new Security());
  virtualLinkDescriptor.setConnectivity_type("type");
  virtualLinkDescriptor.setLeaf_requirement("leaf_req");
  virtualLinkDescriptor.setQos(
      new HashSet<String>() {
        {
          add("qos");
        }
      });
  virtualLinkDescriptor.setTest_access(
      new HashSet<String>() {
        {
          add("test_access");
        }
      });
  return virtualLinkDescriptor;
}
 
开发者ID:openbaton,项目名称:NFVO,代码行数:30,代码来源:VirtualLinkManagementClassSuiteTest.java


示例13: getPnfd_security

import org.openbaton.catalogue.mano.common.Security; //导入依赖的package包/类
public Security getPnfd_security() {
  return pnfd_security;
}
 
开发者ID:openbaton,项目名称:NFVO,代码行数:4,代码来源:PhysicalNetworkFunctionDescriptor.java


示例14: setPnfd_security

import org.openbaton.catalogue.mano.common.Security; //导入依赖的package包/类
public void setPnfd_security(Security pnfd_security) {
  this.pnfd_security = pnfd_security;
}
 
开发者ID:openbaton,项目名称:NFVO,代码行数:4,代码来源:PhysicalNetworkFunctionDescriptor.java


示例15: getManifest_file_security

import org.openbaton.catalogue.mano.common.Security; //导入依赖的package包/类
public Set<Security> getManifest_file_security() {
  return manifest_file_security;
}
 
开发者ID:openbaton,项目名称:NFVO,代码行数:4,代码来源:VirtualNetworkFunctionDescriptor.java


示例16: setManifest_file_security

import org.openbaton.catalogue.mano.common.Security; //导入依赖的package包/类
public void setManifest_file_security(Set<Security> manifest_file_security) {
  this.manifest_file_security = manifest_file_security;
}
 
开发者ID:openbaton,项目名称:NFVO,代码行数:4,代码来源:VirtualNetworkFunctionDescriptor.java


示例17: getVnffgd_security

import org.openbaton.catalogue.mano.common.Security; //导入依赖的package包/类
public Security getVnffgd_security() {
  return vnffgd_security;
}
 
开发者ID:openbaton,项目名称:NFVO,代码行数:4,代码来源:VNFForwardingGraphDescriptor.java


示例18: setVnffgd_security

import org.openbaton.catalogue.mano.common.Security; //导入依赖的package包/类
public void setVnffgd_security(Security vnffgd_security) {
  this.vnffgd_security = vnffgd_security;
}
 
开发者ID:openbaton,项目名称:NFVO,代码行数:4,代码来源:VNFForwardingGraphDescriptor.java


示例19: getVld_security

import org.openbaton.catalogue.mano.common.Security; //导入依赖的package包/类
public Security getVld_security() {
  return vld_security;
}
 
开发者ID:openbaton,项目名称:NFVO,代码行数:4,代码来源:VirtualLinkDescriptor.java


示例20: setVld_security

import org.openbaton.catalogue.mano.common.Security; //导入依赖的package包/类
public void setVld_security(Security vld_security) {
  this.vld_security = vld_security;
}
 
开发者ID:openbaton,项目名称:NFVO,代码行数:4,代码来源:VirtualLinkDescriptor.java



注:本文中的org.openbaton.catalogue.mano.common.Security类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java MultipleAppearance类代码示例发布时间:2022-05-16
下一篇:
Java TooltipLinkHandler类代码示例发布时间:2022-05-16
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap