1 31 32 package org.opencms.file.types; 33 34 import org.opencms.configuration.CmsConfigurationException; 35 import org.opencms.configuration.I_CmsConfigurationParameterHandler; 36 import org.opencms.db.CmsSecurityManager; 37 import org.opencms.file.CmsFile; 38 import org.opencms.file.CmsObject; 39 import org.opencms.file.CmsProperty; 40 import org.opencms.file.CmsResource; 41 import org.opencms.main.CmsException; 42 import org.opencms.main.CmsIllegalArgumentException; 43 44 import java.util.List ; 45 46 75 public interface I_CmsResourceType extends I_CmsConfigurationParameterHandler { 76 77 78 String ADD_MAPPING_METHOD = "addMappingType"; 79 80 81 String ADD_RESOURCE_TYPE_METHOD = "addResourceType"; 82 83 84 String CONFIGURATION_PROPERTY_CREATE = "property.create."; 85 86 87 String CONFIGURATION_RESOURCE_TYPE_ID = "resource.type.id"; 88 89 90 String CONFIGURATION_RESOURCE_TYPE_NAME = "resource.type.name"; 91 92 93 String PROPERTY_ON_RESOURCE = "resource"; 94 95 96 String PROPERTY_ON_STRUCTURE = "structure"; 97 98 107 void addMappingType(String mapping); 108 109 127 void changeLastModifiedProjectId(CmsObject cms, CmsSecurityManager securityManager, CmsResource resource) 128 throws CmsException; 129 130 143 void changeLock(CmsObject cms, CmsSecurityManager securityManager, CmsResource resource) throws CmsException; 144 145 162 void chflags(CmsObject cms, CmsSecurityManager securityManager, CmsResource resource, int flags) 163 throws CmsException; 164 165 184 void chtype(CmsObject cms, CmsSecurityManager securityManager, CmsResource resource, int type) throws CmsException; 185 186 219 void copyResource( 220 CmsObject cms, 221 CmsSecurityManager securityManager, 222 CmsResource source, 223 String destination, 224 int siblingMode) throws CmsException, CmsIllegalArgumentException; 225 226 244 void copyResourceToProject(CmsObject cms, CmsSecurityManager securityManager, CmsResource resource) 245 throws CmsException, CmsIllegalArgumentException; 246 247 266 CmsResource createResource( 267 CmsObject cms, 268 CmsSecurityManager securityManager, 269 String resourcename, 270 byte[] content, 271 List properties) throws CmsException, CmsIllegalArgumentException; 272 273 287 void createSibling( 288 CmsObject cms, 289 CmsSecurityManager securityManager, 290 CmsResource source, 291 String destination, 292 List properties) throws CmsException; 293 294 315 void deleteResource(CmsObject cms, CmsSecurityManager securityManager, CmsResource resource, int siblingMode) 316 throws CmsException; 317 318 332 String getCachePropertyDefault(); 333 334 344 String getClassName(); 345 346 351 List getConfiguredCopyResources(); 352 353 358 List getConfiguredDefaultProperties(); 359 360 365 List getConfiguredMappings(); 366 367 372 int getLoaderId(); 373 374 379 int getTypeId(); 380 381 386 String getTypeName(); 387 388 412 CmsResource importResource( 413 CmsObject cms, 414 CmsSecurityManager securityManager, 415 String resourcename, 416 CmsResource resource, 417 byte[] content, 418 List properties) throws CmsException; 419 420 444 void initConfiguration(String name, String id, String className) throws CmsConfigurationException; 445 446 455 void initialize(CmsObject cms); 456 457 461 boolean isAdditionalModuleResourceType(); 462 463 468 boolean isDirectEditable(); 469 470 475 boolean isFolder(); 476 477 497 void lockResource(CmsObject cms, CmsSecurityManager securityManager, CmsResource resource, int mode) 498 throws CmsException; 499 500 522 void moveResource(CmsObject cms, CmsSecurityManager securityManager, CmsResource resource, String destination) 523 throws CmsException, CmsIllegalArgumentException; 524 525 543 void removeResourceFromProject(CmsObject cms, CmsSecurityManager securityManager, CmsResource resource) 544 throws CmsException, CmsIllegalArgumentException; 545 546 561 void replaceResource( 562 CmsObject cms, 563 CmsSecurityManager securityManager, 564 CmsResource resource, 565 int type, 566 byte[] content, 567 List properties) throws CmsException; 568 569 582 void restoreResourceBackup(CmsObject cms, CmsSecurityManager securityManager, CmsResource resource, int tag) 583 throws CmsException; 584 585 589 void setAdditionalModuleResourceType(boolean additionalType); 590 591 605 void setDateExpired( 606 CmsObject cms, 607 CmsSecurityManager securityManager, 608 CmsResource resource, 609 long dateExpired, 610 boolean recursive) throws CmsException; 611 612 626 void setDateLastModified( 627 CmsObject cms, 628 CmsSecurityManager securityManager, 629 CmsResource resource, 630 long dateLastModified, 631 boolean recursive) throws CmsException; 632 633 647 void setDateReleased( 648 CmsObject cms, 649 CmsSecurityManager securityManager, 650 CmsResource resource, 651 long dateReleased, 652 boolean recursive) throws CmsException; 653 654 670 void undoChanges(CmsObject cms, CmsSecurityManager securityManager, CmsResource resource, boolean recursive) 671 throws CmsException; 672 673 685 void unlockResource(CmsObject cms, CmsSecurityManager securityManager, CmsResource resource) throws CmsException; 686 687 704 CmsFile writeFile(CmsObject cms, CmsSecurityManager securityManager, CmsFile resource) throws CmsException; 705 706 719 void writePropertyObject( 720 CmsObject cms, 721 CmsSecurityManager securityManager, 722 CmsResource resource, 723 CmsProperty property) throws CmsException; 724 725 742 void writePropertyObjects(CmsObject cms, CmsSecurityManager securityManager, CmsResource resource, List properties) 743 throws CmsException; 744 } | Popular Tags |