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