2 * Copyright 2001-2009 Internet2
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * @file shibsp/attribute/SimpleAttribute.h
20 * An Attribute whose values are simple strings.
23 #ifndef __shibsp_simpattr_h__
24 #define __shibsp_simpattr_h__
26 #include <shibsp/attribute/Attribute.h>
31 * An Attribute whose values are simple strings.
33 class SHIBSP_API SimpleAttribute : public Attribute
39 * @param ids array with primary identifier in first position, followed by any aliases
41 SimpleAttribute(const std::vector<std::string>& ids);
44 * Constructs based on a remoted SimpleAttribute.
46 * @param in input object containing marshalled SimpleAttribute
48 SimpleAttribute(DDF& in);
50 virtual ~SimpleAttribute();
53 * Returns the set of values encoded as UTF-8 strings.
55 * <p>For simple values, the serialized form is just the actual string,
56 * so the value array can be directly manipulated.
58 * @return a mutable vector of the values
60 std::vector<std::string>& getValues();
62 // Virtual function overrides.
63 void clearSerializedValues();
69 #endif /* __shibsp_simpattr_h__ */