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