001 /** 002 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portlet.dynamicdatamapping.service; 016 017 import com.liferay.portal.service.ServiceWrapper; 018 019 /** 020 * <p> 021 * This class is a wrapper for {@link DDMStructureService}. 022 * </p> 023 * 024 * @author Brian Wing Shun Chan 025 * @see DDMStructureService 026 * @generated 027 */ 028 public class DDMStructureServiceWrapper implements DDMStructureService, 029 ServiceWrapper<DDMStructureService> { 030 public DDMStructureServiceWrapper(DDMStructureService ddmStructureService) { 031 _ddmStructureService = ddmStructureService; 032 } 033 034 /** 035 * Returns the Spring bean ID for this bean. 036 * 037 * @return the Spring bean ID for this bean 038 */ 039 public java.lang.String getBeanIdentifier() { 040 return _ddmStructureService.getBeanIdentifier(); 041 } 042 043 /** 044 * Sets the Spring bean ID for this bean. 045 * 046 * @param beanIdentifier the Spring bean ID for this bean 047 */ 048 public void setBeanIdentifier(java.lang.String beanIdentifier) { 049 _ddmStructureService.setBeanIdentifier(beanIdentifier); 050 } 051 052 /** 053 * Adds a structure referencing a default parent structure, using the portal 054 * property <code>dynamic.data.lists.storage.type</code> storage type and 055 * default structure type. 056 * 057 * @param userId the primary key of the structure's creator/owner 058 * @param groupId the primary key of the group 059 * @param classNameId the primary key of the class name for the structure's 060 related model 061 * @param nameMap the structure's locales and localized names 062 * @param descriptionMap the structure's locales and localized descriptions 063 * @param xsd the structure's XML schema definition 064 * @param serviceContext the structure's service context. Can set the UUID, 065 creation date, modification date, guest permissions, and group 066 permissions for the structure. 067 * @return the structure 068 * @throws PortalException if a user with the primary key could not be 069 found, if the user did not have permission to add the structure, 070 if the XSD was not well-formed, or if a portal exception occurred 071 * @throws SystemException if a system exception occurred 072 */ 073 public com.liferay.portlet.dynamicdatamapping.model.DDMStructure addStructure( 074 long userId, long groupId, long classNameId, 075 java.util.Map<java.util.Locale, java.lang.String> nameMap, 076 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 077 java.lang.String xsd, 078 com.liferay.portal.service.ServiceContext serviceContext) 079 throws com.liferay.portal.kernel.exception.PortalException, 080 com.liferay.portal.kernel.exception.SystemException { 081 return _ddmStructureService.addStructure(userId, groupId, classNameId, 082 nameMap, descriptionMap, xsd, serviceContext); 083 } 084 085 /** 086 * Adds a structure referencing its parent structure. 087 * 088 * @param groupId the primary key of the group 089 * @param parentStructureId the primary key of the parent structure 090 (optionally {@link 091 com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants#DEFAULT_PARENT_STRUCTURE_ID}) 092 * @param classNameId the primary key of the class name for the structure's 093 related model 094 * @param structureKey the unique string identifying the structure 095 (optionally <code>null</code>) 096 * @param nameMap the structure's locales and localized names 097 * @param descriptionMap the structure's locales and localized descriptions 098 * @param xsd the structure's XML schema definition 099 * @param storageType the structure's storage type. It can be "xml" or 100 "expando". For more information, see {@link 101 com.liferay.portlet.dynamicdatamapping.storage.StorageType}. 102 * @param type the structure's type. For more information, see {@link 103 com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}. 104 * @param serviceContext the structure's service context. Can set the UUID, 105 creation date, modification date, guest permissions, and group 106 permissions for the structure. 107 * @return the structure 108 * @throws PortalException if the user did not have permission to add the 109 structure, if the XSD is not well formed, or if a portal 110 exception occurred 111 * @throws SystemException if a system exception occurred 112 */ 113 public com.liferay.portlet.dynamicdatamapping.model.DDMStructure addStructure( 114 long groupId, long parentStructureId, long classNameId, 115 java.lang.String structureKey, 116 java.util.Map<java.util.Locale, java.lang.String> nameMap, 117 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 118 java.lang.String xsd, java.lang.String storageType, int type, 119 com.liferay.portal.service.ServiceContext serviceContext) 120 throws com.liferay.portal.kernel.exception.PortalException, 121 com.liferay.portal.kernel.exception.SystemException { 122 return _ddmStructureService.addStructure(groupId, parentStructureId, 123 classNameId, structureKey, nameMap, descriptionMap, xsd, 124 storageType, type, serviceContext); 125 } 126 127 /** 128 * Adds a structure referencing the parent structure by its structure key. 129 * In case the parent structure is not found, it uses the default parent 130 * structure ID. 131 * 132 * @param userId the primary key of the structure's creator/owner 133 * @param groupId the primary key of the group 134 * @param parentStructureKey the unique string identifying the structure 135 * @param classNameId the primary key of the class name for the structure's 136 related model 137 * @param structureKey unique string identifying the structure (optionally 138 <code>null</code>) 139 * @param nameMap the structure's locales and localized names 140 * @param descriptionMap the structure's locales and localized descriptions 141 * @param xsd the XML schema definition of the structure 142 * @param storageType the storage type of the structure. It can be XML or 143 expando. For more information, see {@link 144 com.liferay.portlet.dynamicdatamapping.storage.StorageType}. 145 * @param type the structure's type. For more information, see {@link 146 com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}. 147 * @param serviceContext the service context to be applied. Must have the 148 <code>ddmResource</code> attribute to check permissions. Can set 149 the UUID, creation date, modification date, guest permissions, 150 and group permissions for the structure. 151 * @return the structure 152 * @throws PortalException if a user with the primary key could not be 153 found, if the user did not have permission to add the structure, 154 if the XSD was not well-formed, or if a portal exception occurred 155 * @throws SystemException if a system exception occurred 156 */ 157 public com.liferay.portlet.dynamicdatamapping.model.DDMStructure addStructure( 158 long userId, long groupId, java.lang.String parentStructureKey, 159 long classNameId, java.lang.String structureKey, 160 java.util.Map<java.util.Locale, java.lang.String> nameMap, 161 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 162 java.lang.String xsd, java.lang.String storageType, int type, 163 com.liferay.portal.service.ServiceContext serviceContext) 164 throws com.liferay.portal.kernel.exception.PortalException, 165 com.liferay.portal.kernel.exception.SystemException { 166 return _ddmStructureService.addStructure(userId, groupId, 167 parentStructureKey, classNameId, structureKey, nameMap, 168 descriptionMap, xsd, storageType, type, serviceContext); 169 } 170 171 /** 172 * Copies a structure, creating a new structure with all the values 173 * extracted from the original one. The new structure supports a new name 174 * and description. 175 * 176 * @param structureId the primary key of the structure to be copied 177 * @param nameMap the new structure's locales and localized names 178 * @param descriptionMap the new structure's locales and localized 179 descriptions 180 * @param serviceContext the service context to be applied. Can set the 181 UUID, creation date, modification date, guest permissions, and 182 group permissions for the structure. 183 * @return the new structure 184 * @throws PortalException if the user did not have permission to add the 185 structure or if a portal exception occurred 186 * @throws SystemException if a system exception occurred 187 */ 188 public com.liferay.portlet.dynamicdatamapping.model.DDMStructure copyStructure( 189 long structureId, 190 java.util.Map<java.util.Locale, java.lang.String> nameMap, 191 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 192 com.liferay.portal.service.ServiceContext serviceContext) 193 throws com.liferay.portal.kernel.exception.PortalException, 194 com.liferay.portal.kernel.exception.SystemException { 195 return _ddmStructureService.copyStructure(structureId, nameMap, 196 descriptionMap, serviceContext); 197 } 198 199 public com.liferay.portlet.dynamicdatamapping.model.DDMStructure copyStructure( 200 long structureId, 201 com.liferay.portal.service.ServiceContext serviceContext) 202 throws com.liferay.portal.kernel.exception.PortalException, 203 com.liferay.portal.kernel.exception.SystemException { 204 return _ddmStructureService.copyStructure(structureId, serviceContext); 205 } 206 207 /** 208 * Deletes the structure and its resources. 209 * 210 * <p> 211 * Before deleting the structure, the system verifies whether the structure 212 * is required by another entity. If it is needed, an exception is thrown. 213 * </p> 214 * 215 * @param structureId the primary key of the structure to be deleted 216 * @throws PortalException if the user did not have permission to delete the 217 structure or if a portal exception occurred 218 * @throws SystemException if a system exception occurred 219 */ 220 public void deleteStructure(long structureId) 221 throws com.liferay.portal.kernel.exception.PortalException, 222 com.liferay.portal.kernel.exception.SystemException { 223 _ddmStructureService.deleteStructure(structureId); 224 } 225 226 /** 227 * Returns the structure matching the class name ID, structure key, and 228 * group. 229 * 230 * @param groupId the primary key of the group 231 * @param classNameId the primary key of the class name for the structure's 232 related model 233 * @param structureKey the unique string identifying the structure 234 * @return the matching structure, or <code>null</code> if a matching 235 structure could not be found 236 * @throws PortalException if the user did not have permission to view the 237 structure or if a portal exception occurred 238 * @throws SystemException if a system exception occurred 239 */ 240 public com.liferay.portlet.dynamicdatamapping.model.DDMStructure fetchStructure( 241 long groupId, long classNameId, java.lang.String structureKey) 242 throws com.liferay.portal.kernel.exception.PortalException, 243 com.liferay.portal.kernel.exception.SystemException { 244 return _ddmStructureService.fetchStructure(groupId, classNameId, 245 structureKey); 246 } 247 248 /** 249 * Returns the structure with the ID. 250 * 251 * @param structureId the primary key of the structure 252 * @return the structure with the ID 253 * @throws PortalException if the user did not have permission to view the 254 structure or if a structure with the ID could not be found 255 * @throws SystemException if a system exception occurred 256 */ 257 public com.liferay.portlet.dynamicdatamapping.model.DDMStructure getStructure( 258 long structureId) 259 throws com.liferay.portal.kernel.exception.PortalException, 260 com.liferay.portal.kernel.exception.SystemException { 261 return _ddmStructureService.getStructure(structureId); 262 } 263 264 /** 265 * Returns the structure matching the class name ID, structure key, and 266 * group. 267 * 268 * @param groupId the primary key of the structure's group 269 * @param classNameId the primary key of the class name for the structure's 270 related model 271 * @param structureKey the unique string identifying the structure 272 * @return the matching structure 273 * @throws PortalException if the user did not have permission to view the 274 structure or if a matching structure could not be found 275 * @throws SystemException if a system exception occurred 276 */ 277 public com.liferay.portlet.dynamicdatamapping.model.DDMStructure getStructure( 278 long groupId, long classNameId, java.lang.String structureKey) 279 throws com.liferay.portal.kernel.exception.PortalException, 280 com.liferay.portal.kernel.exception.SystemException { 281 return _ddmStructureService.getStructure(groupId, classNameId, 282 structureKey); 283 } 284 285 /** 286 * Returns the structure matching the class name ID, structure key, and 287 * group, optionally in the global scope. 288 * 289 * <p> 290 * This method first searches in the group. If the structure is still not 291 * found and <code>includeGlobalStructures</code> is set to 292 * <code>true</code>, this method searches the global group. 293 * </p> 294 * 295 * @param groupId the primary key of the structure's group 296 * @param classNameId the primary key of the class name for the structure's 297 related model 298 * @param structureKey the unique string identifying the structure 299 * @param includeGlobalStructures whether to include the global scope in 300 the search 301 * @return the matching structure 302 * @throws PortalException if the user did not have permission to view the 303 structure or if a matching structure could not be found 304 * @throws SystemException if a system exception occurred 305 */ 306 public com.liferay.portlet.dynamicdatamapping.model.DDMStructure getStructure( 307 long groupId, long classNameId, java.lang.String structureKey, 308 boolean includeGlobalStructures) 309 throws com.liferay.portal.kernel.exception.PortalException, 310 com.liferay.portal.kernel.exception.SystemException { 311 return _ddmStructureService.getStructure(groupId, classNameId, 312 structureKey, includeGlobalStructures); 313 } 314 315 /** 316 * Returns all the structures in the group that the user has permission to 317 * view. 318 * 319 * @param groupId the primary key of the group 320 * @return the structures in the group that the user has permission to view 321 * @throws SystemException if a system exception occurred 322 */ 323 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures( 324 long groupId) 325 throws com.liferay.portal.kernel.exception.SystemException { 326 return _ddmStructureService.getStructures(groupId); 327 } 328 329 /** 330 * Returns all the structures in the groups that the user has permission to 331 * view. 332 * 333 * @param groupIds the primary key of the groups 334 * @return the structures in the groups that the user has permission to view 335 * @throws SystemException if a system exception occurred 336 */ 337 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures( 338 long[] groupIds) 339 throws com.liferay.portal.kernel.exception.SystemException { 340 return _ddmStructureService.getStructures(groupIds); 341 } 342 343 /** 344 * Returns an ordered range of all the structures matching the groups and 345 * class name IDs, and matching the keywords in the structure names and 346 * descriptions. 347 * 348 * <p> 349 * Useful when paginating results. Returns a maximum of <code>end - 350 * start</code> instances. <code>start</code> and <code>end</code> are not 351 * primary keys, they are indexes in the result set. Thus, <code>0</code> 352 * refers to the first result in the set. Setting both <code>start</code> 353 * and <code>end</code> to {@link 354 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 355 * result set. 356 * </p> 357 * 358 * @param companyId the primary key of the structure's company 359 * @param groupIds the primary keys of the groups 360 * @param classNameIds the primary keys of the class names of the models 361 the structures are related to 362 * @param keywords the keywords (space separated), which may occur in the 363 structure's name or description (optionally <code>null</code>) 364 * @param start the lower bound of the range of structures to return 365 * @param end the upper bound of the range of structures to return (not 366 inclusive) 367 * @param orderByComparator the comparator to order the structures 368 (optionally <code>null</code>) 369 * @return the range of matching structures ordered by the comparator 370 * @throws SystemException if a system exception occurred 371 */ 372 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> search( 373 long companyId, long[] groupIds, long[] classNameIds, 374 java.lang.String keywords, int start, int end, 375 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 376 throws com.liferay.portal.kernel.exception.SystemException { 377 return _ddmStructureService.search(companyId, groupIds, classNameIds, 378 keywords, start, end, orderByComparator); 379 } 380 381 /** 382 * Returns an ordered range of all the structures matching the groups, class 383 * name IDs, name keyword, description keyword, storage type, and type. 384 * 385 * <p> 386 * Useful when paginating results. Returns a maximum of <code>end - 387 * start</code> instances. <code>start</code> and <code>end</code> are not 388 * primary keys, they are indexes in the result set. Thus, <code>0</code> 389 * refers to the first result in the set. Setting both <code>start</code> 390 * and <code>end</code> to {@link 391 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 392 * result set. 393 * </p> 394 * 395 * @param companyId the primary key of the structure's company 396 * @param groupIds the primary keys of the groups 397 * @param classNameIds the primary keys of the class names of the models 398 the structures are related to 399 * @param name the name keywords 400 * @param description the description keywords 401 * @param storageType the structure's storage type. It can be "xml" or 402 "expando". For more information, see {@link 403 com.liferay.portlet.dynamicdatamapping.storage.StorageType}. 404 * @param type the structure's type. For more information, see {@link 405 com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}. 406 * @param andOperator whether every field must match its keywords, or just 407 one field 408 * @param start the lower bound of the range of structures to return 409 * @param end the upper bound of the range of structures to return (not 410 inclusive) 411 * @param orderByComparator the comparator to order the structures 412 (optionally <code>null</code>) 413 * @return the range of matching structures ordered by the comparator 414 * @throws SystemException if a system exception occurred 415 */ 416 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> search( 417 long companyId, long[] groupIds, long[] classNameIds, 418 java.lang.String name, java.lang.String description, 419 java.lang.String storageType, int type, boolean andOperator, int start, 420 int end, 421 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 422 throws com.liferay.portal.kernel.exception.SystemException { 423 return _ddmStructureService.search(companyId, groupIds, classNameIds, 424 name, description, storageType, type, andOperator, start, end, 425 orderByComparator); 426 } 427 428 /** 429 * Returns the number of structures matching the groups and class name IDs, 430 * and matching the keywords in the structure names and descriptions. 431 * 432 * @param companyId the primary key of the structure's company 433 * @param groupIds the primary keys of the groups 434 * @param classNameIds the primary keys of the class names of the models 435 the structures are related to 436 * @param keywords the keywords (space separated), which may occur in the 437 structure's name or description (optionally <code>null</code>) 438 * @return the number of matching structures 439 * @throws SystemException if a system exception occurred 440 */ 441 public int searchCount(long companyId, long[] groupIds, 442 long[] classNameIds, java.lang.String keywords) 443 throws com.liferay.portal.kernel.exception.SystemException { 444 return _ddmStructureService.searchCount(companyId, groupIds, 445 classNameIds, keywords); 446 } 447 448 /** 449 * Returns the number of structures matching the groups, class name IDs, 450 * name keyword, description keyword, storage type, and type 451 * 452 * @param companyId the primary key of the structure's company 453 * @param groupIds the primary keys of the groups 454 * @param classNameIds the primary keys of the class names of the models 455 the structure's are related to 456 * @param name the name keywords 457 * @param description the description keywords 458 * @param storageType the structure's storage type. It can be "xml" or 459 "expando". For more information, see {@link 460 com.liferay.portlet.dynamicdatamapping.storage.StorageType}. 461 * @param type the structure's type. For more information, see {@link 462 com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}. 463 * @param andOperator whether every field must match its keywords, or just 464 one field 465 * @return the number of matching structures 466 * @throws SystemException if a system exception occurred 467 */ 468 public int searchCount(long companyId, long[] groupIds, 469 long[] classNameIds, java.lang.String name, 470 java.lang.String description, java.lang.String storageType, int type, 471 boolean andOperator) 472 throws com.liferay.portal.kernel.exception.SystemException { 473 return _ddmStructureService.searchCount(companyId, groupIds, 474 classNameIds, name, description, storageType, type, andOperator); 475 } 476 477 /** 478 * Updates the structure matching the class name ID, structure key, and 479 * group, replacing its old parent structure, name map, description map, and 480 * XSD with new ones. 481 * 482 * @param groupId the primary key of the group 483 * @param parentStructureId the primary key of the new parent structure 484 * @param classNameId the primary key of the class name for the structure's 485 related model 486 * @param structureKey the unique string identifying the structure 487 * @param nameMap the structure's new locales and localized names 488 * @param descriptionMap the structure's new locales and localized 489 description 490 * @param xsd the structure's new XML schema definition 491 * @param serviceContext the service context to be applied. Can set the 492 modification date. 493 * @return the updated structure 494 * @throws PortalException if the user did not have permission to update the 495 structure or if a portal exception occurred 496 * @throws SystemException if a system exception occurred 497 */ 498 public com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateStructure( 499 long groupId, long parentStructureId, long classNameId, 500 java.lang.String structureKey, 501 java.util.Map<java.util.Locale, java.lang.String> nameMap, 502 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 503 java.lang.String xsd, 504 com.liferay.portal.service.ServiceContext serviceContext) 505 throws com.liferay.portal.kernel.exception.PortalException, 506 com.liferay.portal.kernel.exception.SystemException { 507 return _ddmStructureService.updateStructure(groupId, parentStructureId, 508 classNameId, structureKey, nameMap, descriptionMap, xsd, 509 serviceContext); 510 } 511 512 /** 513 * Updates the structure matching the structure ID, replacing the old parent 514 * structure ID, name map, description map, and XSD with the new values. 515 * 516 * @param structureId the primary key of the structure 517 * @param parentStructureId the new parent structure primary key 518 * @param nameMap the structure's new locales and localized names 519 * @param descriptionMap the structure's new locales and localized 520 description 521 * @param xsd the new XML schema definition of the structure 522 * @param serviceContext the service context to be applied. Can set the 523 modification date. 524 * @return the updated structure 525 * @throws PortalException if the user did not have permission to update the 526 structure or if a portal exception occurred 527 * @throws SystemException if a system exception occurred 528 */ 529 public com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateStructure( 530 long structureId, long parentStructureId, 531 java.util.Map<java.util.Locale, java.lang.String> nameMap, 532 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 533 java.lang.String xsd, 534 com.liferay.portal.service.ServiceContext serviceContext) 535 throws com.liferay.portal.kernel.exception.PortalException, 536 com.liferay.portal.kernel.exception.SystemException { 537 return _ddmStructureService.updateStructure(structureId, 538 parentStructureId, nameMap, descriptionMap, xsd, serviceContext); 539 } 540 541 /** 542 * @deprecated Renamed to {@link #getWrappedService} 543 */ 544 public DDMStructureService getWrappedDDMStructureService() { 545 return _ddmStructureService; 546 } 547 548 /** 549 * @deprecated Renamed to {@link #setWrappedService} 550 */ 551 public void setWrappedDDMStructureService( 552 DDMStructureService ddmStructureService) { 553 _ddmStructureService = ddmStructureService; 554 } 555 556 public DDMStructureService getWrappedService() { 557 return _ddmStructureService; 558 } 559 560 public void setWrappedService(DDMStructureService ddmStructureService) { 561 _ddmStructureService = ddmStructureService; 562 } 563 564 private DDMStructureService _ddmStructureService; 565 }