/**
 * Copyright 2015 The original authors.
 * 
 * Licensed 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 io.sundr.adapter.api;

import io.sundr.model.repo.DefinitionRepository;

public class AdapterContext {

  private final DefinitionRepository definitionRepository;

  public AdapterContext(DefinitionRepository definitionRepository) {
    this.definitionRepository = definitionRepository;
  }

  public DefinitionRepository getDefinitionRepository() {
    return definitionRepository;
  }
}

@@ -638,16 +638,131 @@
 r.api;%0A%0A
+import java.util.Collections;%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0Aimport io.sundr.model.AttributeKey;%0A
 import i
@@ -802,16 +802,16 @@
 sitory;%0A
-
 %0Apublic 
@@ -892,16 +892,70 @@
 ository;
+%0A  private final Map%3CAttributeKey, Object%3E attributes;
 %0A%0A  publ
@@ -1029,52 +1029,717 @@
 this
-.definitionRepository = definitionRepository
+(definitionRepository, new HashMap%3C%3E());%0A  %7D%0A%0A  public AdapterContext(DefinitionRepository definitionRepository, Map%3CAttributeKey, Object%3E attributes) %7B%0A    this.definitionRepository = definitionRepository;%0A    this.attributes = attributes;%0A  %7D%0A%0A  public Map%3CAttributeKey, Object%3E getAttributes() %7B%0A    if (attributes == null) %7B%0A      return null;%0A    %7D%0A    return Collections.unmodifiableMap(attributes);%0A  %7D%0A%0A  public %3CT%3E T getAttribute(AttributeKey%3CT%3E key) %7B%0A    if (attributes == null) %7B%0A      return null;%0A    %7D%0A    return (T) attributes.get(key);%0A  %7D%0A%0A  public %3CT%3E boolean hasAttribute(AttributeKey%3CT%3E key) %7B%0A    if (attributes == null) %7B%0A      return false;%0A    %7D%0A    return attributes.containsKey(key)
 ;%0A  

Introduce attributes to the AdapterContext