001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.wicket.http2.markup.head; 018 019/** 020 * A push header to be applied when the resource is pushed 021 * 022 * @author Tobias Soloschenko 023 * 024 */ 025public class PushItemHeaderValue 026{ 027 /** 028 * The header operation to be used 029 * 030 * @author Tobias Soloschenko 031 * 032 */ 033 public enum HeaderOperation { 034 /** 035 * Header value is going to be set 036 */ 037 SET, 038 /** 039 * Header value is going to be add 040 */ 041 ADD 042 } 043 044 private String value; 045 046 private HeaderOperation operation; 047 048 /** 049 * @param value 050 * the value of the header 051 * @param operation 052 * the header operation 053 */ 054 public PushItemHeaderValue(String value, HeaderOperation operation) 055 { 056 this.value = value; 057 this.operation = operation; 058 } 059 060 /** 061 * The value of the header 062 * 063 * @return the value of the header 064 */ 065 public String getValue() 066 { 067 return value; 068 } 069 070 /** 071 * Sets the value of the header 072 * 073 * @param value 074 * the value of the header 075 */ 076 public void setValue(String value) 077 { 078 this.value = value; 079 } 080 081 /** 082 * Gets the header operation 083 * 084 * @return the header operation 085 */ 086 public HeaderOperation getOperation() 087 { 088 return operation; 089 } 090 091 /** 092 * Sets the header operation 093 * 094 * @param operation 095 * the header operation 096 */ 097 public void setOperation(HeaderOperation operation) 098 { 099 this.operation = operation; 100 } 101}