Examples of AttachmentData


Examples of com.cloud.network.bigswitch.AttachmentData

        port.getPort().setTenant_id(cmd.getTenantUuid());

        try {
            _bigswitchVnsApi.createPort(cmd.getNetworkUuid(), port);
            try {
                AttachmentData attachment = new AttachmentData();
                attachment.getAttachment().setId(cmd.getPortUuid());
                attachment.getAttachment().setMac(cmd.getMac());
                _bigswitchVnsApi.modifyPortAttachment(cmd.getTenantUuid(),
                                cmd.getNetworkUuid(), cmd.getPortUuid(), attachment);

            } catch (BigSwitchVnsApiException ex) {
                s_logger.warn("modifyPortAttachment failed after switchport was created, removing switchport");
View Full Code Here

Examples of com.cloud.network.bigswitch.AttachmentData

        port.getPort().setTenantId(cmd.getTenantUuid());

        try {
            _bigswitchVnsApi.createPort(cmd.getNetworkUuid(), port);
            try {
                AttachmentData attachment = new AttachmentData();
                attachment.getAttachment().setId(cmd.getPortUuid());
                attachment.getAttachment().setMac(cmd.getMac());
                _bigswitchVnsApi.modifyPortAttachment(cmd.getTenantUuid(), cmd.getNetworkUuid(), cmd.getPortUuid(), attachment);

            } catch (BigSwitchVnsApiException ex) {
                s_logger.warn("modifyPortAttachment failed after switchport was created, removing switchport");
                _bigswitchVnsApi.deletePort(cmd.getTenantUuid(), cmd.getNetworkUuid(), cmd.getPortUuid());
View Full Code Here

Examples of com.sun.xml.ws.security.opt.impl.crypto.AttachmentData

        }
        return new JAXBEncryptedData(edt,data,key,soapVersion);
    }
   
    public EncryptedData createEncryptedData(String id, Attachment attachment, String dataAlgo, KeyInfoType keyInfo, Key key, EncryptionTarget target) {
        AttachmentData attachData = new AttachmentData(attachment);
        String cid = "cid:" + attachment.getContentId();
        boolean contentOnly = target.getContentOnly();
        EncryptedDataType edt = new EncryptedDataType();
        if(contentOnly){
            edt.setType(MessageConstants.SWA11_ATTACHMENT_CONTENT_ONLY);
View Full Code Here

Examples of com.sun.xml.ws.security.opt.impl.crypto.AttachmentData

        }
        Attachment attachment = attachments.get(cidRef);
        if(attachment == null){
            throw new URIReferenceException ("Attachment Resource with Identifier  "+cidRef+" was not found");
        }
        AttachmentData attachData = new AttachmentData(attachment);
        return attachData;
    }
View Full Code Here

Examples of com.sun.xml.ws.security.opt.impl.crypto.AttachmentData

        SecuredMessage secureMsg = filterContext.getSecuredMessage();
        Attachment attachment = secureMsg.getAttachment(uri);
        if (attachment == null) {
            throw new URIReferenceException("Attachment Resource with Identifier  " + uri + " was not found");
        }
        AttachmentData attachData = new AttachmentData(attachment);
        return attachData;
    }
View Full Code Here

Examples of com.sun.xml.ws.security.opt.impl.crypto.AttachmentData

        }
        return new JAXBEncryptedData(edt,data,key,soapVersion);
    }
   
    public EncryptedData createEncryptedData(String id, Attachment attachment, String dataAlgo, KeyInfoType keyInfo, Key key, EncryptionTarget target) {
        AttachmentData attachData = new AttachmentData(attachment);
        String cid = "cid:" + attachment.getContentId();
        boolean contentOnly = target.getContentOnly();
        EncryptedDataType edt = new EncryptedDataType();
        if(contentOnly){
            edt.setType(MessageConstants.SWA11_ATTACHMENT_CONTENT_ONLY);
View Full Code Here

Examples of io.fathom.cloud.protobuf.IdentityModel.AttachmentData

    }

    private void setSecret(NamedItemCollection<AttachmentData> store, ClientApp app, SecretData data)
            throws CloudException {
        String appKey = app.getAppId();
        AttachmentData existing = store.find(appKey);
        AttachmentData.Builder b;
        if (existing == null) {
            b = AttachmentData.newBuilder();
            b.setKey(appKey);
        } else {
View Full Code Here

Examples of io.fathom.cloud.protobuf.IdentityModel.AttachmentData

    }

    private byte[] findUserSecret(NamedItemCollection<AttachmentData> store, ClientApp app, AuthenticatedUser user)
            throws CloudException {
        String appKey = app.getAppId();
        AttachmentData existing = store.find(appKey);
        if (existing == null) {
            return null;
        }

        SecretData secretData = existing.getData();

        try {
            byte[] plaintext = appSecrets.decryptUserSecret(user, secretData);
            return plaintext;
        } catch (KeyczarException e) {
View Full Code Here

Examples of io.fathom.cloud.protobuf.IdentityModel.AttachmentData

    }

    private byte[] findProjectSecret(NamedItemCollection<AttachmentData> store, ClientApp app,
            AuthenticatedProject project) throws CloudException {
        String appKey = app.getAppId();
        AttachmentData existing = store.find(appKey);
        if (existing == null) {
            return null;
        }

        SecretData secretData = existing.getData();

        try {
            byte[] plaintext = appSecrets.decryptProjectSecret(project, secretData);
            return plaintext;
        } catch (KeyczarException e) {
View Full Code Here

Examples of org.waveprotocol.box.server.persistence.AttachmentStore.AttachmentData

  public void testStoreCanStoreData() throws Exception {
    String testData = "some file data";
    AttachmentId id = new AttachmentId("", "id_1");
    AttachmentStore store = makeStoreWithData(id, testData);

    AttachmentData data = store.getAttachment(id);
    assertEquals(testData, dataToString(data));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.