1 13 package org.jahia.services.containers; 14 15 import java.io.IOException ; 16 import java.util.Hashtable ; 17 import java.util.Map ; 18 import java.util.Properties ; 19 import java.util.Set ; 20 import java.util.SortedSet ; 21 import java.util.Vector ; 22 23 import org.jahia.data.JahiaDOMObject; 24 import org.jahia.data.JahiaData; 25 import org.jahia.data.containers.JahiaContainer; 26 import org.jahia.data.containers.JahiaContainerDefinition; 27 import org.jahia.data.containers.JahiaContainerList; 28 import org.jahia.data.containers.JahiaContainerSet; 29 import org.jahia.exceptions.JahiaException; 30 import org.jahia.params.ParamBean; 31 import org.jahia.services.JahiaService; 32 import org.jahia.services.pages.ContentPage; 33 import org.jahia.services.usermanager.JahiaUser; 34 import org.jahia.services.version.ActivationTestResults; 35 import org.jahia.services.version.EntryLoadRequest; 36 import org.jahia.services.version.JahiaSaveVersion; 37 import org.jahia.services.version.StateModificationContext; 38 import org.jahia.utils.xml.XMLSerializationOptions; 39 import org.jahia.utils.xml.XmlWriter; 40 41 public abstract class JahiaContainersService extends JahiaService { 42 43 52 public abstract void cloneContainerList (int cListID, int newPageID, 53 int parentAclID, 54 boolean childrenCloned) 55 throws JahiaException; 56 57 66 public abstract JahiaContainerList cloneContainerList (int cListID, 67 int newPageID, int parentEntryID, int parentAclID, 68 boolean childrenCloned) 69 throws JahiaException; 70 71 79 public abstract JahiaContainer cloneContainer (JahiaContainer theContainer, 80 int newCListID, int newPageID, 81 int parentAclID, 82 boolean childrenCloned) 83 throws JahiaException; 84 85 95 public abstract JahiaContainerSet buildContainerStructureForPage (JahiaData 96 jData, EntryLoadRequest loadVersion) 97 throws JahiaException; 98 99 106 public abstract Vector getctndefidsInPage (ContentPage contentPage, 107 EntryLoadRequest 108 entryLoadRequest) 109 throws JahiaException; 110 111 119 public abstract Vector getContainerListIDs (int pageID, int defID, 120 EntryLoadRequest loadVersion) 121 throws JahiaException; 122 123 131 public abstract Vector getContainerListIDsInPage (ContentPage 132 contentPage, EntryLoadRequest entryLoadRequest) 133 throws JahiaException; 134 135 148 public abstract SortedSet getContainerListInPageEntryStates (int pageID) 149 throws JahiaException; 150 151 160 public abstract Vector getCtnIds (EntryLoadRequest loadVersion) 161 throws JahiaException; 162 163 170 public abstract Vector getctnidsInList (int listID, 171 EntryLoadRequest loadVersion) 172 throws JahiaException; 173 174 public abstract Vector getctnidsInList (int listID) 175 throws JahiaException; 176 177 191 public abstract Vector getctnidsInList (int listID, String fieldName, 192 boolean asc, 193 EntryLoadRequest loadVersion) 194 throws JahiaException; 195 196 204 public abstract Vector getCtnIds (int siteID) 205 throws JahiaException; 206 207 212 public abstract Vector getCtnIds () 213 throws JahiaException; 214 215 221 public abstract Vector getCtnIds(boolean orderByRanking) 222 throws JahiaException; 223 224 225 235 public abstract Vector getCtnListIDsInContainer (int ctnID) 236 throws JahiaException; 237 238 245 public abstract Vector getFieldIDsInContainer (int ctnid) 246 throws JahiaException; 247 248 255 public abstract Vector getFieldIDsInContainer (int ctnid, 256 EntryLoadRequest loadVersion) 257 throws JahiaException; 258 259 public abstract Map getFieldIDsAndDefsInContainer(int ctnid, 260 EntryLoadRequest loadVersion) throws JahiaException; 261 262 270 public abstract int getContainerListID (String containerName, int pageID) 271 throws JahiaException; 272 273 278 public abstract Vector getAllContainerDefinitionIDs () 279 throws JahiaException; 280 281 290 public abstract JahiaContainer loadContainerInfo (int ctnid) 291 throws JahiaException; 292 293 public abstract JahiaContainer loadContainerInfo (int ctnid, 294 EntryLoadRequest loadVersion) 295 throws JahiaException; 296 297 310 public abstract JahiaContainer loadContainer (int ctnid, int loadFlag) 311 throws JahiaException; 312 313 326 public abstract JahiaContainer loadContainer (int ctnid, int loadFlag, 327 ParamBean jParams) 328 throws JahiaException; 329 330 public abstract JahiaContainer loadContainer (int ctnid, int loadFlag, 331 ParamBean jParams, 332 EntryLoadRequest loadVersion) 333 throws JahiaException; 334 335 336 346 public abstract JahiaContainer loadContainer (int ctnid, int loadFlag, 349 ParamBean jParams, 350 EntryLoadRequest loadVersion, 351 Hashtable cachedFieldsInContainer, 352 Hashtable cachedContainersFromContainerLists, 353 Hashtable cachedContainerListsFromContainers) 354 throws JahiaException; 355 356 357 370 public abstract void saveContainerInfo (JahiaContainer theContainer, 371 int parentID, 372 int parentAclID, 373 ParamBean jParams) 374 throws JahiaException; 375 376 386 public abstract void saveContainer (JahiaContainer theContainer, 387 int containerParentID, 388 ParamBean jParams) 389 throws JahiaException; 390 391 401 public abstract void deleteContainer (int ctnid, ParamBean jParams) 402 throws JahiaException; 403 404 429 public abstract ActivationTestResults isContainerValidForActivation ( 430 Set languageCodes, 431 int id, JahiaUser user, JahiaSaveVersion saveVersion, 432 ParamBean jParams, StateModificationContext stateModifContext) 433 throws JahiaException; 434 435 463 public abstract ActivationTestResults activateStagedContainer ( 464 Set languageCodes, 465 int id, JahiaUser user, JahiaSaveVersion saveVersion, 466 ParamBean jParams, StateModificationContext stateModifContext) 467 throws JahiaException; 468 469 482 public abstract ActivationTestResults activateStagedContainers ( 483 Set languageCodes, 484 int pageID, JahiaUser user, JahiaSaveVersion saveVersion, 485 ParamBean jParams, StateModificationContext stateModifContext) 486 throws JahiaException; 487 488 501 public abstract ActivationTestResults activateStagedContainerLists ( 502 Set languageCodes, 503 int pageID, JahiaUser user, 504 JahiaSaveVersion saveVersion, 505 StateModificationContext stateModifContext) 506 throws JahiaException; 507 508 523 public abstract ActivationTestResults areContainersValidForActivation ( 524 Set languageCodes, 525 int pageID, 526 JahiaUser user, 527 JahiaSaveVersion saveVersion, 528 ParamBean jParams, 529 StateModificationContext stateModifContext) 530 throws JahiaException; 531 532 546 public abstract ActivationTestResults areContainerListsValidForActivation ( 547 Set languageCodes, 548 int pageID, 549 JahiaUser user, 550 JahiaSaveVersion saveVersion, 551 StateModificationContext stateModifContext) 552 throws JahiaException; 553 554 562 public abstract JahiaContainerList loadContainerListInfo (int 563 containerListID) 564 throws JahiaException; 565 566 public abstract JahiaContainerList loadContainerListInfo (int 567 containerListID, EntryLoadRequest loadVersion) 568 throws JahiaException; 569 570 583 public abstract JahiaContainerList loadContainerList (int containerListID, 584 int loadFlag) 585 throws JahiaException; 586 587 600 public abstract JahiaContainerList loadContainerList (int containerListID, 601 int loadFlag, ParamBean jParams) 602 throws JahiaException; 603 604 618 public abstract JahiaContainerList loadContainerList (int containerListID, 619 int loadFlag, 620 ParamBean jParams, 621 EntryLoadRequest loadVersion, 622 Hashtable cachedFieldsInContainer, 623 Hashtable cachedContainersFromContainerLists, 624 Hashtable cachedContainerListsFromContainers) 625 throws JahiaException; 626 627 642 public abstract JahiaContainerList loadContainerList (int containerListID, 643 Vector ctnids, 644 int loadFlag, 645 ParamBean jParams, 646 EntryLoadRequest loadVersion, 647 Hashtable cachedFieldsInContainer, 648 Hashtable cachedContainersFromContainerLists, 649 Hashtable cachedContainerListsFromContainers) 650 throws JahiaException; 651 652 662 public abstract void saveContainerListInfo (JahiaContainerList 663 theContainerList, 664 int parentAclID) 665 throws JahiaException; 666 667 675 678 685 public abstract void deleteContainerList (int listID, ParamBean jParams) 686 throws JahiaException; 687 688 698 public abstract JahiaContainerDefinition loadContainerDefinition (int 699 definitionID) 700 throws JahiaException; 701 702 713 public abstract JahiaContainerDefinition loadContainerDefinition (int 714 siteID, 715 String definitionName) 716 throws JahiaException; 717 718 727 public abstract void saveContainerDefinition (JahiaContainerDefinition 728 theDefinition) 729 throws JahiaException; 730 731 739 public abstract void deleteContainerDefinition (int definitionID) 740 throws JahiaException; 741 742 750 public abstract JahiaDOMObject getContainersAsDOM (int siteID) 751 throws JahiaException; 752 753 761 public abstract JahiaDOMObject getContainerListsAsDOM (int siteID) 762 throws JahiaException; 763 764 772 public abstract JahiaDOMObject getContainerListPropsAsDOM (int siteID) 773 throws JahiaException; 774 775 783 public abstract JahiaDOMObject getContainerDefsAsDOM (int siteID) 784 throws JahiaException; 785 786 794 public abstract JahiaDOMObject getContainerDefPropsAsDOM (int siteID) 795 throws JahiaException; 796 797 803 public abstract JahiaDOMObject getContainerExtendedPropsAsDOM (int siteID) 804 throws JahiaException; 805 806 814 public abstract JahiaDOMObject getContainerStructsAsDOM (int siteID) 815 throws JahiaException; 816 817 826 public abstract Vector getAclIDs (int siteID) 827 throws JahiaException; 828 829 838 public abstract Vector getCtnListFieldAclIDs (int siteID) 839 throws JahiaException; 840 841 857 public abstract boolean markPageContainerListsLanguageForDeletion (int 858 pageID, 859 JahiaUser user, 860 String languageCode, 861 StateModificationContext stateModifContext) 862 throws JahiaException; 863 864 873 public abstract void purgePageContainerLists (int pageID) 874 throws JahiaException; 875 876 894 public abstract boolean markContainerListLanguageForDeletion (int listID, 895 JahiaUser user, 896 String languageCode, 897 StateModificationContext 898 stateModifContext) 899 throws JahiaException; 900 901 922 public abstract boolean markContainerLanguageForDeletion ( 923 int id, JahiaUser user, String languageCode, 924 StateModificationContext stateModifContext) 925 throws JahiaException; 926 927 948 public abstract void serializePageContainerListsToXML (XmlWriter xmlWriter, 949 XMLSerializationOptions xmlSerializationOptions, 950 int pageID, ParamBean paramBean) 951 throws IOException ; 952 953 972 public abstract void serializeContainerListToXML (XmlWriter xmlWriter, 973 XMLSerializationOptions xmlSerializationOptions, 974 int containerListID, ParamBean paramBean) 975 throws IOException ; 976 977 996 public abstract void serializeContainerToXML (XmlWriter xmlWriter, 997 XMLSerializationOptions 998 xmlSerializationOptions, 999 int containerID, 1000 ParamBean paramBean) 1001 throws IOException ; 1002 1003 1015 public abstract SortedSet getAllPageTopLevelContainerListIDs (int pageID, 1016 EntryLoadRequest loadRequest) 1017 throws JahiaException; 1018 1019 1032 public abstract SortedSet getContainerDefinitionParents (int 1033 containerDefinitionID) 1034 throws JahiaException; 1035 1036 1054 public abstract SortedSet getSiteTopLevelContainerListsIDsByName (int 1055 siteID, 1056 String name, 1057 EntryLoadRequest loadRequest) 1058 throws JahiaException; 1059 1060 1072 public abstract Properties getContainerProperties (int containerID) 1073 throws JahiaException; 1074 1075 1087 public abstract void setContainerProperty (int containerID, 1088 int jahiaID, 1089 String propertyName, 1090 String propertyValue) 1091 throws JahiaException; 1092 1093 1108 public abstract void setContainerProperties (int containerID, 1109 int jahiaID, 1110 Properties containerProperties) 1111 throws JahiaException; 1112 1113 1131 public abstract Map getContainersLanguagesState (int pageID) 1132 throws JahiaException; 1133 1134 1141 public abstract void invalidateContainerFromCache (int containerID); 1142 1143 1150 public abstract void invalidateContainerListFromCache (int containerListID); 1151 1152} | Popular Tags |