File indexing completed on 2024-12-01 04:48:03
0001 /* 0002 This file is part of oxaccess. 0003 0004 SPDX-FileCopyrightText: 2009 Tobias Koenig <tokoe@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.0-or-later 0007 */ 0008 0009 #include "folder.h" 0010 0011 using namespace OXA; 0012 0013 Folder::Permissions::Permissions() 0014 : mFolderPermission(NoPermission) 0015 , mObjectReadPermission(NoReadPermission) 0016 , mObjectWritePermission(NoWritePermission) 0017 , mObjectDeletePermission(NoDeletePermission) 0018 , mAdminFlag(false) 0019 { 0020 } 0021 0022 void Folder::Permissions::setFolderPermission(FolderPermission permission) 0023 { 0024 mFolderPermission = permission; 0025 } 0026 0027 Folder::Permissions::FolderPermission Folder::Permissions::folderPermission() const 0028 { 0029 return mFolderPermission; 0030 } 0031 0032 void Folder::Permissions::setObjectReadPermission(ObjectReadPermission permission) 0033 { 0034 mObjectReadPermission = permission; 0035 } 0036 0037 Folder::Permissions::ObjectReadPermission Folder::Permissions::objectReadPermission() const 0038 { 0039 return mObjectReadPermission; 0040 } 0041 0042 void Folder::Permissions::setObjectWritePermission(ObjectWritePermission permission) 0043 { 0044 mObjectWritePermission = permission; 0045 } 0046 0047 Folder::Permissions::ObjectWritePermission Folder::Permissions::objectWritePermission() const 0048 { 0049 return mObjectWritePermission; 0050 } 0051 0052 void Folder::Permissions::setObjectDeletePermission(ObjectDeletePermission permission) 0053 { 0054 mObjectDeletePermission = permission; 0055 } 0056 0057 Folder::Permissions::ObjectDeletePermission Folder::Permissions::objectDeletePermission() const 0058 { 0059 return mObjectDeletePermission; 0060 } 0061 0062 void Folder::Permissions::setAdminFlag(bool value) 0063 { 0064 mAdminFlag = value; 0065 } 0066 0067 bool Folder::Permissions::adminFlag() const 0068 { 0069 return mAdminFlag; 0070 } 0071 0072 Folder::Folder() 0073 : mObjectId(-1) 0074 , mFolderId(-1) 0075 { 0076 } 0077 0078 void Folder::setObjectStatus(ObjectStatus status) 0079 { 0080 mObjectStatus = status; 0081 } 0082 0083 Folder::ObjectStatus Folder::objectStatus() const 0084 { 0085 return mObjectStatus; 0086 } 0087 0088 void Folder::setTitle(const QString &title) 0089 { 0090 mTitle = title; 0091 } 0092 0093 QString Folder::title() const 0094 { 0095 return mTitle; 0096 } 0097 0098 void Folder::setType(Type type) 0099 { 0100 mType = type; 0101 } 0102 0103 Folder::Type Folder::type() const 0104 { 0105 return mType; 0106 } 0107 0108 void Folder::setModule(Module module) 0109 { 0110 mModule = module; 0111 } 0112 0113 Folder::Module Folder::module() const 0114 { 0115 return mModule; 0116 } 0117 0118 void Folder::setObjectId(qlonglong id) 0119 { 0120 mObjectId = id; 0121 } 0122 0123 qlonglong Folder::objectId() const 0124 { 0125 return mObjectId; 0126 } 0127 0128 void Folder::setFolderId(qlonglong id) 0129 { 0130 mFolderId = id; 0131 } 0132 0133 qlonglong Folder::folderId() const 0134 { 0135 return mFolderId; 0136 } 0137 0138 void Folder::setIsDefaultFolder(bool value) 0139 { 0140 mIsDefaultFolder = value; 0141 } 0142 0143 bool Folder::isDefaultFolder() const 0144 { 0145 return mIsDefaultFolder; 0146 } 0147 0148 void Folder::setOwner(qlonglong id) 0149 { 0150 mOwner = id; 0151 } 0152 0153 qlonglong Folder::owner() const 0154 { 0155 return mOwner; 0156 } 0157 0158 void Folder::setLastModified(const QString &timeStamp) 0159 { 0160 mLastModified = timeStamp; 0161 } 0162 0163 QString Folder::lastModified() const 0164 { 0165 return mLastModified; 0166 } 0167 0168 void Folder::setUserPermissions(const UserPermissions &permissions) 0169 { 0170 mUserPermissions = permissions; 0171 } 0172 0173 Folder::UserPermissions Folder::userPermissions() const 0174 { 0175 return mUserPermissions; 0176 } 0177 0178 void Folder::setGroupPermissions(const GroupPermissions &permissions) 0179 { 0180 mGroupPermissions = permissions; 0181 } 0182 0183 Folder::GroupPermissions Folder::groupPermissions() const 0184 { 0185 return mGroupPermissions; 0186 }