2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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.
16 #include <commons/Exception.h>
17 #include "IViewProperties.h"
19 namespace WrtPlugins {
22 IViewProperties::SortType IViewProperties::getSortOrder() const
27 std::string IViewProperties::getMetaTag() const
32 IViewProperties::SortOrder IViewProperties::getPrimarySortOrder() const
34 return m_primarySortOrder;
37 IViewProperties::SortOrder IViewProperties::getSecondarySortOrder() const
39 return m_secondarySortOrder;
42 unsigned long IViewProperties::getStartDate() const
47 unsigned long IViewProperties::getEndDate() const
52 void IViewProperties::setSortOrder(IViewProperties::SortType order)
54 if (order < ASCENDING || order > DESCENDING) {
55 Throw(Commons::InvalidArgumentException);
60 void IViewProperties::setMetaTag(const std::string &metaTag)
65 void IViewProperties::setPrimarySortOrder(
66 IViewProperties::SortOrder primarySortOrder)
68 if (primarySortOrder < NONE || primarySortOrder > BY_TYPE) {
69 Throw(Commons::InvalidArgumentException);
71 m_primarySortOrder = primarySortOrder;
74 void IViewProperties::setSecondarySortOrder(
75 IViewProperties::SortOrder secondarySortOrder)
77 if (secondarySortOrder < NONE || secondarySortOrder > BY_TYPE) {
78 Throw(Commons::InvalidArgumentException);
80 m_secondarySortOrder = secondarySortOrder;
83 void IViewProperties::setStartDate(long startDate)
85 m_startDate = startDate;
88 void IViewProperties::setEndDate(long endDate)
93 IViewProperties::IViewProperties() :
95 m_primarySortOrder(NONE),
96 m_secondarySortOrder(NONE),