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