Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Licensed to jclouds, Inc. (jclouds) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. jclouds licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 
 package org.jclouds.cloudfiles.domain;
 
 import java.net.URI;

Author(s):
James Murty
 
 public class ContainerCDNMetadata implements Comparable<ContainerCDNMetadata> {
 
    private String name;
    private boolean cdn_enabled;
    private boolean log_retention;
    private long ttl;
    private URI cdn_uri;
    private URI cdn_ssl_uri;
    private URI cdn_streaming_uri;
    private String referrer_acl;
    private String useragent_acl;
 
    public ContainerCDNMetadata(String nameboolean cdnEnabledboolean logRetentionlong ttlURI cdnUriURI cdnSslUriURI cdnStreamingUri) {
       this. = name;
       this. = cdnEnabled;
       this. = logRetention;
       this. = ttl;
       this. = cdnUri;
       this. = cdnSslUri;
       this. = cdnStreamingUri;
    }
 
    public ContainerCDNMetadata() {
    }

   
Beware: The container name is not available from HEAD CDN responses and will be null. return the name of the container to which these CDN settings apply.
 
    public String getName() {
       return ;
    }
 
    public boolean isCDNEnabled() {
       return ;
    }
 
    public boolean isLogRetention() {
       return ;
    }
 
    public long getTTL() {
       return ;
    }
 
    public URI getCDNUri() {
       return ;
    }
 
    public URI getCDNSslUri() {
       return ;
    }
 
    public URI getCDNStreamingUri() {
       return ;
    }
 
    public String getReferrerACL() {
       return ;
    }
 
    public String getUseragentACL() {
       return ;
    }
 
    public int compareTo(ContainerCDNMetadata o) {
       if (getName() == null)
          return -1;
       return (this == o) ? 0 : getName().compareTo(o.getName());
    }
 
    @Override
   public int hashCode() {
      final int prime = 31;
      int result = 1;
      result = prime * result + (( == null) ? 0 : .hashCode());
      return result;
   }
   public boolean equals(Object obj) {
      if (this == obj)
         return true;
      if (obj == null)
         return false;
      if (getClass() != obj.getClass())
         return false;
      
      ContainerCDNMetadata other = (ContainerCDNMetadataobj;
      if ( == null) {
         if (other.cdn_uri != null)
            return false;
      } else if (!.equals(other.cdn_uri))
         return false;
      
      return true;
   }
   public String toString() {
      return String.format(
               "[name=%s, cdn_enabled=%s, log_retention=%s, ttl=%s, cdn_uri=%s, cdn_ssl_uri=%s, cdn_streaming_uri=%s, referrer_acl=%s, useragent_acl=%s]",
   }
New to GrepCode? Check out our FAQ X