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 /** 359 * Returns an ordered range of all the structures matching the groups and 360 * class name IDs, and matching the keywords in the structure names and 361 * descriptions. 362 * 363 * <p> 364 * Useful when paginating results. Returns a maximum of <code>end - 365 * start</code> instances. <code>start</code> and <code>end</code> are not 366 * primary keys, they are indexes in the result set. Thus, <code>0</code> 367 * refers to the first result in the set. Setting both <code>start</code> 368 * and <code>end</code> to {@link 369 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 370 * result set. 371 * </p> 372 * 373 * @param companyId the primary key of the structure's company 374 * @param groupIds the primary keys of the groups 375 * @param classNameIds the primary keys of the class names of the models 376 the structures are related to 377 * @param keywords the keywords (space separated), which may occur in the 378 structure's name or description (optionally <code>null</code>) 379 * @param start the lower bound of the range of structures to return 380 * @param end the upper bound of the range of structures to return (not 381 inclusive) 382 * @param orderByComparator the comparator to order the structures 383 (optionally <code>null</code>) 384 * @return the range of matching structures ordered by the comparator 385 * @throws SystemException if a system exception occurred 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 orderByComparator) 392 throws com.liferay.portal.kernel.exception.SystemException { 393 return _ddmStructureService.search(companyId, groupIds, classNameIds, 394 keywords, start, end, orderByComparator); 395 } 396 397 /** 398 * Returns an ordered range of all the structures matching the groups, class 399 * name IDs, name keyword, description keyword, storage type, and type. 400 * 401 * <p> 402 * Useful when paginating results. Returns a maximum of <code>end - 403 * start</code> instances. <code>start</code> and <code>end</code> are not 404 * primary keys, they are indexes in the result set. Thus, <code>0</code> 405 * refers to the first result in the set. Setting both <code>start</code> 406 * and <code>end</code> to {@link 407 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 408 * result set. 409 * </p> 410 * 411 * @param companyId the primary key of the structure's company 412 * @param groupIds the primary keys of the groups 413 * @param classNameIds the primary keys of the class names of the models 414 the structures are related to 415 * @param name the name keywords 416 * @param description the description keywords 417 * @param storageType the structure's storage type. It can be "xml" or 418 "expando". For more information, see {@link 419 com.liferay.portlet.dynamicdatamapping.storage.StorageType}. 420 * @param type the structure's type. For more information, see {@link 421 com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}. 422 * @param andOperator whether every field must match its keywords, or just 423 one field 424 * @param start the lower bound of the range of structures to return 425 * @param end the upper bound of the range of structures to return (not 426 inclusive) 427 * @param orderByComparator the comparator to order the structures 428 (optionally <code>null</code>) 429 * @return the range of matching structures ordered by the comparator 430 * @throws SystemException if a system exception occurred 431 */ 432 @Override 433 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> search( 434 long companyId, long[] groupIds, long[] classNameIds, 435 java.lang.String name, java.lang.String description, 436 java.lang.String storageType, int type, boolean andOperator, int start, 437 int end, 438 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 439 throws com.liferay.portal.kernel.exception.SystemException { 440 return _ddmStructureService.search(companyId, groupIds, classNameIds, 441 name, description, storageType, type, andOperator, start, end, 442 orderByComparator); 443 } 444 445 /** 446 * Returns the number of structures matching the groups and class name IDs, 447 * and matching the keywords in the structure names and descriptions. 448 * 449 * @param companyId the primary key of the structure's company 450 * @param groupIds the primary keys of the groups 451 * @param classNameIds the primary keys of the class names of the models 452 the structures are related to 453 * @param keywords the keywords (space separated), which may occur in the 454 structure's name or description (optionally <code>null</code>) 455 * @return the number of matching structures 456 * @throws SystemException if a system exception occurred 457 */ 458 @Override 459 public int searchCount(long companyId, long[] groupIds, 460 long[] classNameIds, java.lang.String keywords) 461 throws com.liferay.portal.kernel.exception.SystemException { 462 return _ddmStructureService.searchCount(companyId, groupIds, 463 classNameIds, keywords); 464 } 465 466 /** 467 * Returns the number of structures matching the groups, class name IDs, 468 * name keyword, description keyword, storage type, and type 469 * 470 * @param companyId the primary key of the structure's company 471 * @param groupIds the primary keys of the groups 472 * @param classNameIds the primary keys of the class names of the models 473 the structure's are related to 474 * @param name the name keywords 475 * @param description the description keywords 476 * @param storageType the structure's storage type. It can be "xml" or 477 "expando". For more information, see {@link 478 com.liferay.portlet.dynamicdatamapping.storage.StorageType}. 479 * @param type the structure's type. For more information, see {@link 480 com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}. 481 * @param andOperator whether every field must match its keywords, or just 482 one field 483 * @return the number of matching structures 484 * @throws SystemException if a system exception occurred 485 */ 486 @Override 487 public int searchCount(long companyId, long[] groupIds, 488 long[] classNameIds, java.lang.String name, 489 java.lang.String description, java.lang.String storageType, int type, 490 boolean andOperator) 491 throws com.liferay.portal.kernel.exception.SystemException { 492 return _ddmStructureService.searchCount(companyId, groupIds, 493 classNameIds, name, description, storageType, type, andOperator); 494 } 495 496 /** 497 * Updates the structure matching the class name ID, structure key, and 498 * group, replacing its old parent structure, name map, description map, and 499 * XSD with new ones. 500 * 501 * @param groupId the primary key of the group 502 * @param parentStructureId the primary key of the new parent structure 503 * @param classNameId the primary key of the class name for the structure's 504 related model 505 * @param structureKey the unique string identifying the structure 506 * @param nameMap the structure's new locales and localized names 507 * @param descriptionMap the structure's new locales and localized 508 description 509 * @param xsd the structure's new XML schema definition 510 * @param serviceContext the service context to be applied. Can set the 511 modification date. 512 * @return the updated structure 513 * @throws PortalException if the user did not have permission to update the 514 structure or if a portal exception occurred 515 * @throws SystemException if a system exception occurred 516 */ 517 @Override 518 public com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateStructure( 519 long groupId, long parentStructureId, long classNameId, 520 java.lang.String structureKey, 521 java.util.Map<java.util.Locale, java.lang.String> nameMap, 522 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 523 java.lang.String xsd, 524 com.liferay.portal.service.ServiceContext serviceContext) 525 throws com.liferay.portal.kernel.exception.PortalException, 526 com.liferay.portal.kernel.exception.SystemException { 527 return _ddmStructureService.updateStructure(groupId, parentStructureId, 528 classNameId, structureKey, nameMap, descriptionMap, xsd, 529 serviceContext); 530 } 531 532 /** 533 * Updates the structure matching the structure ID, replacing the old parent 534 * structure ID, name map, description map, and XSD with the new values. 535 * 536 * @param structureId the primary key of the structure 537 * @param parentStructureId the new parent structure primary key 538 * @param nameMap the structure's new locales and localized names 539 * @param descriptionMap the structure's new locales and localized 540 description 541 * @param xsd the new XML schema definition of the structure 542 * @param serviceContext the service context to be applied. Can set the 543 modification date. 544 * @return the updated structure 545 * @throws PortalException if the user did not have permission to update the 546 structure or if a portal exception occurred 547 * @throws SystemException if a system 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 com.liferay.portal.kernel.exception.SystemException { 558 return _ddmStructureService.updateStructure(structureId, 559 parentStructureId, nameMap, descriptionMap, xsd, serviceContext); 560 } 561 562 /** 563 * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} 564 */ 565 public DDMStructureService getWrappedDDMStructureService() { 566 return _ddmStructureService; 567 } 568 569 /** 570 * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} 571 */ 572 public void setWrappedDDMStructureService( 573 DDMStructureService ddmStructureService) { 574 _ddmStructureService = ddmStructureService; 575 } 576 577 @Override 578 public DDMStructureService getWrappedService() { 579 return _ddmStructureService; 580 } 581 582 @Override 583 public void setWrappedService(DDMStructureService ddmStructureService) { 584 _ddmStructureService = ddmStructureService; 585 } 586 587 private DDMStructureService _ddmStructureService; 588 }