├── .gitignore ├── Docker - Oracle Database ├── README └── xe │ ├── Dockerfile.11.2.0.1.0 │ └── README ├── Docker - Oracle Fusion Middleware 12c ├── Dockerfile.12.2.1.0.0 ├── README └── installers │ ├── README │ └── silent.rsp ├── Docker - Oracle WebCenter 11g ├── Dockerfile.11.1.1.9.0 ├── Dockerfile.latest ├── README ├── domain │ ├── README │ ├── docker_domain_admin.jar │ ├── docker_domain_full_12172015_180612.jar │ └── docker_domain_managed.jar ├── jdk │ └── README ├── rcu │ └── README ├── scripts │ ├── README │ ├── add_server.py │ └── start_server.sh ├── wcc │ ├── Dockerfile.11.1.1.9.0 │ ├── Dockerfile.11.1.1.9.5 │ └── README ├── wcp │ ├── Dockerfile.11.1.1.9.0 │ ├── Dockerfile.11.1.1.9.8 │ └── README └── wls │ ├── README │ └── silent.xml ├── DragAndDropFileUploadHTML5 └── file_upload.htm ├── LICENSE ├── OracleDocumentsCloudDataControlPart1 ├── .adf │ └── META-INF │ │ └── adf-config.xml ├── Model │ ├── Model.jpr │ ├── Model.properties │ ├── adfmsrc │ │ ├── META-INF │ │ │ └── adfm.xml │ │ └── model │ │ │ └── DataControls.dcx │ ├── classes │ │ ├── .data │ │ │ └── Model.cdi │ │ ├── META-INF │ │ │ └── adfm.xml │ │ ├── Model.properties │ │ └── model │ │ │ ├── DataControls.dcx │ │ │ ├── Item.class │ │ │ ├── ItemsDC.class │ │ │ └── Type.class │ ├── public_html │ │ └── WEB-INF │ │ │ ├── faces-config.xml │ │ │ └── web.xml │ └── src │ │ └── model │ │ ├── Item.java │ │ ├── ItemsDC.java │ │ └── Type.java ├── OracleDocumentsCloudDataControlPart1.jws ├── ViewController │ ├── ViewController.jpr │ ├── adfmsrc │ │ ├── META-INF │ │ │ └── adfm.xml │ │ └── view │ │ │ ├── DataBindings.cpx │ │ │ └── pageDefs │ │ │ └── index1PageDef.xml │ ├── classes │ │ ├── META-INF │ │ │ ├── adf-settings.xml │ │ │ └── adfm.xml │ │ └── view │ │ │ ├── DataBindings.cpx │ │ │ └── pageDefs │ │ │ └── index1PageDef.xml │ ├── public_html │ │ ├── WEB-INF │ │ │ ├── adfc-config.xml │ │ │ ├── faces-config.xml │ │ │ ├── trinidad-config.xml │ │ │ └── web.xml │ │ └── index1.jspx │ └── src │ │ └── META-INF │ │ └── adf-settings.xml └── src │ └── META-INF │ └── weblogic-application.xml ├── README ├── RIDCJavaStoredProcedures ├── CheckinFileIntoContentServer.java ├── sql-do-checkin-test.sql └── sql-test-user.sql ├── RIDCJythonScripts ├── JythonWCCAllExampleScripts.zip ├── copyfolderitems.py ├── createanewfolder.py ├── createshortcuts.py ├── deletecontent.py ├── deletefolderitems.py ├── listfolderitems.py ├── movefolderitems.py ├── propagatemetadata.py ├── unfilefolderitems.py ├── updatemetadata.py └── uploadfile.py ├── Rule-based Classification ├── create_db_objects.sql ├── generate_categories_example.sql └── rule-basedclassificationobjects_cmu.zip ├── SampleComponent01 ├── SampleComponent01.hda ├── SampleComponent01.zip ├── readme.txt ├── resources │ ├── samplecomponent01_query.htm │ ├── samplecomponent01_resource1.htm │ └── samplecomponent01_service.htm └── templates │ ├── SampleComponent01_content_types.htm │ └── samplecomponent01_template.hda └── WebCenterContentInEnterprise ├── WebCenterContentArch.jpg └── WebCenterContentArch.odg /.gitignore: -------------------------------------------------------------------------------- 1 | *.jdb 2 | *.lck 3 | .project 4 | .metadata 5 | .pydevproject 6 | .DS_Store 7 | -------------------------------------------------------------------------------- /Docker - Oracle Database/README: -------------------------------------------------------------------------------- 1 | Docker Images for Oracle Database 2 | Version: 1.0.0 3 | Updated: 12/20/2015 4 | -------------------------------------------------------------------- 5 | 6 | This project contains the Dockerfiles and the corresponding directory structures 7 | needed to build Docker containers for Oracle Database. 8 | 9 | Docker containers at the time of the writing of this article have a hardcoded 10 | limitation of 64M for shared memory (/dev/shm) on every container. There is a 11 | fix in the experimental release of Docker which should become part of Docker 12 | version 1.10.0 and above. You can read about it here: 13 | https://github.com/docker/docker/issues/16164 14 | 15 | Oracle Databases require at least 1GB of shared memory and as such the 16 | [/etc/init.d/oracle-xe configure] command will fail. Therefore, I have used the 17 | Docker 1.10.0-dev Experimental for this build. 18 | 19 | To build an image for use, follow the instructions below: 20 | 21 | 1. Install the Experimental Docker build. 22 | curl -sSL https://experimental.docker.com/ | sh 23 | 24 | 2. Update the kernel parameters on the host machine to meet the Oracle 25 | specifications. The specifications can be found on the webpage here: 26 | http://docs.oracle.com/cd/E17781_01/install.112/e18802/toc.htm#BABJFAIA 27 | 28 | 3. Create a base directory for your Docker context. 29 | mkdir ~/database 30 | 31 | 4. Create the following directories under the Docker context directory. You may 32 | not need all of these directories depending on the image you are trying to 33 | build. 34 | cd ~/database 35 | mkdir xe 36 | 37 | 5. Download the required software packages into the directories we created in 38 | the previous step. At the time of the creation of this README, the following 39 | installers and patched were available. The instruction on where to download 40 | these files are in READMEs in those directories. 41 | ~/oracle/db/oracle-xe-11.2.0-1.0.x86_64.rpm.zip 42 | 43 | 6. Make sure that the files have the appropriate permissions. 44 | chmod -R go+r ~/database 45 | 46 | 7. Place the Dockerfile for the image you want to build in the base directory. 47 | ~/database/xe/Dockerfile.11.2.0.1.0 48 | 49 | 8. Run the appropriate command to build your image. Use --no-cache=true if you 50 | do not want to cache intermediate images. 51 | cd ~/database 52 | docker build -t oracle/db/xe:11.2.0.1.0 --shm-size=2g \ 53 | -f ~/database/xe/Dockerfile.11.2.0.1.0 . 54 | 55 | 9. To start a container running the database, run the following command: 56 | docker run -i -P --shm-size=2g --name=xe-db1 -t oracle/db/xe:11.2.0.1.0 57 | -------------------------------------------------------------------------------- /Docker - Oracle Database/xe/Dockerfile.11.2.0.1.0: -------------------------------------------------------------------------------- 1 | FROM oraclelinux:6 2 | MAINTAINER Justin Paul 3 | 4 | ENV _SCRATCH /tmp/scratch 5 | ENV PASSWORD welcome1 6 | 7 | COPY xe/oracle-xe-11.2.0-1.0.x86_64.rpm.zip ${_SCRATCH}/db/ 8 | 9 | RUN yum update -y -q && \ 10 | yum install -y -q binutils compat-libcap1 compat-libstdc++-33 \ 11 | compat-libstdc++-33.i686 gcc gcc-c++ glibc glibc-devel glibc-devel.i686 \ 12 | libaio libaio-devel libgcc libgcc.i686 libstdc++ libstdc++.i686 \ 13 | libstdc++-devel libXext libXtst libXi openmotif openmotif22 redhat-lsb \ 14 | sysstat zlib zlib.i686 libX11 libX11.i686 unzip xorg-x11-utils xorg-x11-xauth 15 | 16 | RUN unzip -qq ${_SCRATCH}/db/oracle-xe-11.2.0-1.0.x86_64.rpm.zip -d ${_SCRATCH}/db && \ 17 | rpm -ivh ${_SCRATCH}/db/Disk1/oracle-xe-11.2.0-1.0.x86_64.rpm && \ 18 | sed -i "s/ORACLE_PASSWORD=/ORACLE_PASSWORD=${PASSWORD}/g" \ 19 | ${_SCRATCH}/db/Disk1/response/xe.rsp && \ 20 | sed -i "s/ORACLE_CONFIRM_PASSWORD=/ORACLE_CONFIRM_PASSWORD=${PASSWORD}/g" \ 21 | ${_SCRATCH}/db/Disk1/response/xe.rsp && \ 22 | /etc/init.d/oracle-xe configure responseFile=${_SCRATCH}/db/Disk1/response/xe.rsp 23 | 24 | RUN rm -rf ${_SCRATCH} 25 | 26 | CMD /etc/init.d/oracle-xe start && /bin/bash 27 | -------------------------------------------------------------------------------- /Docker - Oracle Database/xe/README: -------------------------------------------------------------------------------- 1 | Download the database installer from here 2 | http://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html 3 | 4 | Downloaded file: oracle-xe-11.2.0-1.0.x86_64.rpm.zip 5 | 6 | Also make sure that the file has appropriate file permissions 7 | 8 | chmod -R go+r * 9 | -------------------------------------------------------------------------------- /Docker - Oracle Fusion Middleware 12c/Dockerfile.12.2.1.0.0: -------------------------------------------------------------------------------- 1 | FROM oraclelinux:7 2 | MAINTAINER Justin Paul 3 | 4 | ENV _SCRATCH /tmp/scratch 5 | ENV ORA_HOME /u01/app/oracle 6 | ENV JDK_HOME ${ORA_HOME}/jdk 7 | ENV FMW_HOME ${ORA_HOME}/middleware 8 | # ENV ADM_HOME ${ORA_HOME}/admin 9 | 10 | # COPY domain ${_SCRATCH}/domain/ 11 | # COPY scripts ${_SCRATCH}/scripts/ 12 | COPY installers ${_SCRATCH}/ 13 | 14 | RUN yum update -y -q && \ 15 | yum install -y -q binutils compat-libcap1 compat-libstdc++-33 \ 16 | compat-libstdc++-33.i686 gcc gcc-c++ glibc glibc-devel glibc-devel.i686 \ 17 | libaio libaio-devel libgcc libgcc.i686 libstdc++ libstdc++.i686 \ 18 | libstdc++-devel libXext libXtst libXi openmotif openmotif22 redhat-lsb \ 19 | sysstat zlib zlib.i686 libX11 libX11.i686 unzip xorg-x11-utils xorg-x11-xauth \ 20 | unzip ksh make ocfs2-tools numactl numactl-devel motif motif-devel && \ 21 | groupadd -g 1000 oinstall && \ 22 | useradd -u 1000 -g 1000 -m oracle && \ 23 | mkdir -p ${ORA_HOME} && \ 24 | chown -R oracle:oinstall ${_SCRATCH} && \ 25 | chown -R oracle:oinstall ${ORA_HOME} 26 | 27 | USER oracle 28 | 29 | RUN mkdir -p ${JDK_HOME} ${FMW_HOME} && \ 30 | echo "inventory_loc=${FMW_HOME}/oraInventory" > ${_SCRATCH}/oraInst.loc && \ 31 | echo "inst_group=oinstall" >> ${_SCRATCH}/oraInst.loc && \ 32 | tar xzf ${_SCRATCH}/jdk-8u66-linux-x64.gz -C ${JDK_HOME} --strip-components=1 && \ 33 | rm -rf ${_SCRATCH}/jdk-8u66-linux-x64.gz && \ 34 | unzip ${_SCRATCH}/fmw_12.2.1.0.0_infrastructure_Disk1_1of1.zip -d ${_SCRATCH} && \ 35 | ${JDK_HOME}/bin/java -jar ${_SCRATCH}/fmw_12.2.1.0.0_infrastructure.jar \ 36 | -novalidation -silent -responseFile ${_SCRATCH}/silent.rsp \ 37 | -invPtrLoc ${_SCRATCH}/oraInst.loc ORACLE_HOME=${FMW_HOME} \ 38 | INSTALL_TYPE="Fusion Middleware Infrastructure" && \ 39 | rm -rf ${_SCRATCH}/fmw_12.2.1.0.0_infrastructure_Disk1_1of1.zip \ 40 | ${_SCRATCH}/fmw_12.2.1.0.0_infrastructure.jar && \ 41 | export WLS_INSTALLED=1; \ 42 | [[ -n ${WLS_INSTALLED} ]] && \ 43 | [[ -f ${_SCRATCH}/fmw_12.2.1.0.0_bpmqs_Disk1_1of2.zip ]] && \ 44 | [[ -f ${_SCRATCH}/fmw_12.2.1.0.0_bpmqs_Disk1_2of2.zip ]] && \ 45 | unzip ${_SCRATCH}/fmw_12.2.1.0.0_bpmqs_Disk1_1of2.zip -d ${_SCRATCH} && \ 46 | unzip ${_SCRATCH}/fmw_12.2.1.0.0_bpmqs_Disk1_2of2.zip -d ${_SCRATCH} && \ 47 | ${JDK_HOME}/bin/java -jar ${_SCRATCH}/fmw_12.2.1.0.0_bpm_quickstart.jar \ 48 | -novalidation -silent -responseFile ${_SCRATCH}/silent.rsp \ 49 | -invPtrLoc ${_SCRATCH}/oraInst.loc ORACLE_HOME=${FMW_HOME} && \ 50 | rm -rf ${_SCRATCH}/fmw_12.2.1.0.0_bpmqs_Disk1_1of2.zip \ 51 | ${_SCRATCH}/fmw_12.2.1.0.0_bpmqs_Disk1_2of2.zip \ 52 | ${_SCRATCH}/fmw_12.2.1.0.0_bpm_quickstart.jar \ 53 | ${_SCRATCH}/fmw_12.2.1.0.0_bpm_quickstart2.jar && \ 54 | export BPM_INSTALLED=1; \ 55 | [[ -n ${WLS_INSTALLED} ]] && [[ -z ${BPM_INSTALLED} ]] && \ 56 | [[ -f ${_SCRATCH}/fmw_12.2.1.0.0_soaqs_Disk1_1of2.zip ]] && \ 57 | [[ -f ${_SCRATCH}/fmw_12.2.1.0.0_soaqs_Disk1_2of2.zip ]] && \ 58 | unzip ${_SCRATCH}/fmw_12.2.1.0.0_soaqs_Disk1_1of2.zip -d ${_SCRATCH} && \ 59 | unzip ${_SCRATCH}/fmw_12.2.1.0.0_soaqs_Disk1_2of2.zip -d ${_SCRATCH} && \ 60 | ${JDK_HOME}/bin/java -jar ${_SCRATCH}/fmw_12.2.1.0.0_soa_quickstart.jar \ 61 | -novalidation -silent -responseFile ${_SCRATCH}/silent.rsp \ 62 | -invPtrLoc ${_SCRATCH}/oraInst.loc ORACLE_HOME=${FMW_HOME} && \ 63 | rm -rf ${_SCRATCH}/fmw_12.2.1.0.0_soaqs_Disk1_1of2.zip \ 64 | ${_SCRATCH}/fmw_12.2.1.0.0_soaqs_Disk1_2of2.zip \ 65 | ${_SCRATCH}/fmw_12.2.1.0.0_soa_quickstart.jar \ 66 | ${_SCRATCH}/fmw_12.2.1.0.0_soa_quickstart2.jar; \ 67 | [[ -n ${WLS_INSTALLED} ]] && \ 68 | [[ -f ${_SCRATCH}/fmw_12.2.1.0.0_wccontent_Disk1_1of1.zip ]] && \ 69 | unzip ${_SCRATCH}/fmw_12.2.1.0.0_wccontent_Disk1_1of1.zip -d ${_SCRATCH} && \ 70 | ${JDK_HOME}/bin/java -jar ${_SCRATCH}/fmw_12.2.1.0.0_wccontent_generic.jar \ 71 | -novalidation -silent -responseFile ${_SCRATCH}/silent.rsp \ 72 | -invPtrLoc ${_SCRATCH}/oraInst.loc ORACLE_HOME=${FMW_HOME} \ 73 | INSTALL_TYPE="WebCenter Content" && \ 74 | rm -rf ${_SCRATCH}/fmw_12.2.1.0.0_wccontent_Disk1_1of1.zip \ 75 | ${_SCRATCH}/fmw_12.2.1.0.0_wccontent_generic.jar; \ 76 | [[ -n ${WLS_INSTALLED} ]] && \ 77 | [[ -f ${_SCRATCH}/fmw_12.2.1.0.0_wcportal_Disk1_1of1.zip ]] && \ 78 | unzip ${_SCRATCH}/fmw_12.2.1.0.0_wcportal_Disk1_1of1.zip -d ${_SCRATCH} && \ 79 | ${JDK_HOME}/bin/java -jar ${_SCRATCH}/fmw_12.2.1.0.0_wcportal_generic.jar \ 80 | -novalidation -silent -responseFile ${_SCRATCH}/silent.rsp \ 81 | -invPtrLoc ${_SCRATCH}/oraInst.loc ORACLE_HOME=${FMW_HOME} \ 82 | INSTALL_TYPE="WebCenter Portal" && \ 83 | rm -rf ${_SCRATCH}/fmw_12.2.1.0.0_wcportal_Disk1_1of1.zip \ 84 | ${_SCRATCH}/fmw_12.2.1.0.0_wcportal_generic.jar; \ 85 | [[ -n ${WLS_INSTALLED} ]] && \ 86 | [[ -f ${_SCRATCH}/fmw_12.2.1.0.0_wcsites_Disk1_1of1.zip ]] && \ 87 | unzip ${_SCRATCH}/fmw_12.2.1.0.0_wcsites_Disk1_1of1.zip -d ${_SCRATCH} && \ 88 | ${JDK_HOME}/bin/java -jar ${_SCRATCH}/fmw_12.2.1.0.0_wcsites_generic.jar \ 89 | -novalidation -silent -responseFile ${_SCRATCH}/silent.rsp \ 90 | -invPtrLoc ${_SCRATCH}/oraInst.loc ORACLE_HOME=${FMW_HOME} \ 91 | INSTALL_TYPE="WebCenter Sites" && \ 92 | rm -rf ${_SCRATCH}/fmw_12.2.1.0.0_wcsites_Disk1_1of1.zip \ 93 | ${_SCRATCH}/fmw_12.2.1.0.0_wcsites_generic.jar; \ 94 | [[ -n ${WLS_INSTALLED} ]] && \ 95 | [[ -f ${_SCRATCH}/fmw_12.2.1.0.0_ohs_linux64_Disk1_1of1.zip ]] && \ 96 | unzip ${_SCRATCH}/fmw_12.2.1.0.0_ohs_linux64_Disk1_1of1.zip -d ${_SCRATCH} && \ 97 | ${_SCRATCH}/fmw_12.2.1.0.0_ohs_linux64.bin -jreLoc ${JDK_HOME} \ 98 | -novalidation -silent -responseFile ${_SCRATCH}/silent.rsp \ 99 | -invPtrLoc ${_SCRATCH}/oraInst.loc ORACLE_HOME=${FMW_HOME} \ 100 | INSTALL_TYPE="Colocated HTTP Server (Managed through WebLogic server)" && \ 101 | rm -rf ${_SCRATCH}/fmw_12.2.1.0.0_ohs_linux64_Disk1_1of1.zip \ 102 | ${_SCRATCH}/fmw_12.2.1.0.0_ohs_linux64.bin; \ 103 | rm -rf ${_SCRATCH} 104 | 105 | CMD /bin/bash 106 | -------------------------------------------------------------------------------- /Docker - Oracle Fusion Middleware 12c/README: -------------------------------------------------------------------------------- 1 | Docker Images for Oracle Fusion Middleware (12.2.1.0.0) 2 | Version: 1.0.0 3 | Updated: 12/24/2015 4 | -------------------------------------------------------------------- 5 | 6 | This project contains the Dockerfiles and the corresponding directory structures 7 | needed to build Docker containers for WebCenter Portal and Content. 8 | 9 | To build an image for use, follow the instructions below: 10 | 11 | 1. Create a base directory for your Docker context. 12 | mkdir ~/fmw 13 | 14 | 2. Create the following directories under the Docker context directory. You may 15 | not need all of these directories depending on the image you are trying to 16 | build. 17 | cd ~/fmw 18 | mkdir installers domain scripts 19 | 20 | 3. Download the required software packages into the directories we created in 21 | the previous step. At the time of the creation of this README, the following 22 | installers were available. The instruction on where to download 23 | these files are in README in the installers directory. 24 | ~/fmw/installers/jdk-8u66-linux-x64.gz 25 | ~/fmw/installers/fmw_12.2.1.0.0_infrastructure_Disk1_1of1.zip 26 | ~/fmw/installers/fmw_12.2.1.0.0_bpmqs_Disk1_1of2.zip 27 | ~/fmw/installers/fmw_12.2.1.0.0_bpmqs_Disk1_2of2.zip 28 | ~/fmw/installers/fmw_12.2.1.0.0_soaqs_Disk1_1of2.zip 29 | ~/fmw/installers/fmw_12.2.1.0.0_soaqs_Disk1_2of2.zip 30 | ~/fmw/installers/fmw_12.2.1.0.0_wccontent_Disk1_1of1.zip 31 | ~/fmw/installers/fmw_12.2.1.0.0_wcportal_Disk1_1of1.zip 32 | ~/fmw/installers/fmw_12.2.1.0.0_wcsites_Disk1_1of1.zip 33 | ~/fmw/installers/fmw_12.2.1.0.0_ohs_linux64_Disk1_1of1.zip 34 | ~/fmw/installers/silent.rsp 35 | ~/fmw/domain/* 36 | ~/fmw/scripts/* 37 | 38 | 4. Make sure that all the files have the appropriate permissions. 39 | chmod -R go+r ~/fmw 40 | 41 | 5. Place the Dockerfile for the image you want to build in the base directory. 42 | ~/fmw/Dockerfile.12.2.1.0.0 43 | 44 | 6. Run the appropriate command to build your image. Use --no-cache=true if you 45 | do not want to cache intermediate images. 46 | cd ~/fmw 47 | docker build -t oracle/fmw:12.2.1.0.0 -f ~/fmw/Dockerfile.12.2.1.0.0 . 48 | -------------------------------------------------------------------------------- /Docker - Oracle Fusion Middleware 12c/installers/README: -------------------------------------------------------------------------------- 1 | Go to Oracle Technology Network to download the files. 2 | 3 | JDK: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html 4 | WLS: http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-main-097127.html 5 | BPM: http://www.oracle.com/technetwork/middleware/bpm/downloads/index.html 6 | SOA: http://www.oracle.com/technetwork/middleware/soasuite/downloads/index.html 7 | WCC: http://www.oracle.com/technetwork/middleware/webcenter/content/downloads/index.html 8 | WCP: http://www.oracle.com/technetwork/middleware/webcenter/portal/downloads/index.html 9 | WCS: http://www.oracle.com/technetwork/middleware/webcenter/sites/downloads/index.html 10 | WEB: http://www.oracle.com/technetwork/middleware/webtier/downloads/index.html 11 | 12 | Downloaded Files: jdk-8u66-linux-x64.gz 13 | fmw_12.2.1.0.0_infrastructure_Disk1_1of1.zip 14 | fmw_12.2.1.0.0_bpmqs_Disk1_1of2.zip 15 | fmw_12.2.1.0.0_bpmqs_Disk1_2of2.zip 16 | fmw_12.2.1.0.0_soaqs_Disk1_1of2.zip 17 | fmw_12.2.1.0.0_soaqs_Disk1_2of2.zip 18 | fmw_12.2.1.0.0_wccontent_Disk1_1of1.zip 19 | fmw_12.2.1.0.0_wcportal_Disk1_1of1.zip 20 | fmw_12.2.1.0.0_wcsites_Disk1_1of1.zip 21 | fmw_12.2.1.0.0_ohs_linux64_Disk1_1of1.zip 22 | 23 | Java JDK and Weblogic files are required. If you do not download any of the 24 | other files, that product will not be installed. 25 | 26 | Make sure that the file has appropriate file permissions. 27 | 28 | chmod -R go+r * 29 | -------------------------------------------------------------------------------- /Docker - Oracle Fusion Middleware 12c/installers/silent.rsp: -------------------------------------------------------------------------------- 1 | [ENGINE] 2 | 3 | #DO NOT CHANGE THIS. 4 | Response File Version=1.0.0.0.0 5 | 6 | [GENERIC] 7 | 8 | #Set this to true if you wish to skip software updates 9 | DECLINE_AUTO_UPDATES=true 10 | 11 | # 12 | MOS_USERNAME= 13 | 14 | # 15 | MOS_PASSWORD= 16 | 17 | #If the Software updates are already downloaded and available on your local system, then specify the path to the directory where these patches are available and set SPECIFY_DOWNLOAD_LOCATION to true 18 | AUTO_UPDATES_LOCATION= 19 | 20 | # 21 | SOFTWARE_UPDATES_PROXY_SERVER= 22 | 23 | # 24 | SOFTWARE_UPDATES_PROXY_PORT= 25 | 26 | # 27 | SOFTWARE_UPDATES_PROXY_USER= 28 | 29 | # 30 | SOFTWARE_UPDATES_PROXY_PASSWORD= 31 | 32 | #The oracle home location. This can be an existing Oracle Home or a new Oracle Home 33 | #ORACLE_HOME=/u01/app/oracle/middleware 34 | 35 | #Set this variable value to the Installation Type selected. 36 | #INSTALL_TYPE=Fusion Middleware Infrastructure 37 | #INSTALL_TYPE=Fusion Middleware Infrastructure With Examples 38 | #INSTALL_TYPE=WebCenter Content 39 | #INSTALL_TYPE=WebCenter Portal 40 | #INSTALL_TYPE=WebCenter Portal SOA Composites 41 | #INSTALL_TYPE=WebCenter Sites 42 | #INSTALL_TYPE=WebCenter Sites - With Examples 43 | #INSTALL_TYPE=WebCenter Sites - Satellite Server 44 | #INSTALL_TYPE=Standalone HTTP Server (Managed independently of WebLogic server) 45 | #INSTALL_TYPE=Colocated HTTP Server (Managed through WebLogic server) 46 | 47 | #Provide the My Oracle Support Username. If you wish to ignore Oracle Configuration Manager configuration provide empty string for user name. 48 | MYORACLESUPPORT_USERNAME= 49 | 50 | #Provide the My Oracle Support Password 51 | MYORACLESUPPORT_PASSWORD= 52 | 53 | #Set this to true if you wish to decline the security updates. Setting this to true and providing empty string for My Oracle Support username will ignore the Oracle Configuration Manager configuration 54 | DECLINE_SECURITY_UPDATES=true 55 | 56 | #Set this to true if My Oracle Support Password is specified 57 | SECURITY_UPDATES_VIA_MYORACLESUPPORT=false 58 | 59 | #Provide the Proxy Host 60 | PROXY_HOST= 61 | 62 | #Provide the Proxy Port 63 | PROXY_PORT= 64 | 65 | #Provide the Proxy Username 66 | PROXY_USER= 67 | 68 | #Provide the Proxy Password 69 | PROXY_PWD= 70 | 71 | #Type String (URL format) Indicates the OCM Repeater URL which should be of the format [scheme[Http/Https]]://[repeater host]:[repeater port] 72 | COLLECTOR_SUPPORTHUB_URL= 73 | 74 | 75 | -------------------------------------------------------------------------------- /Docker - Oracle WebCenter 11g/Dockerfile.11.1.1.9.0: -------------------------------------------------------------------------------- 1 | FROM oraclelinux:6 2 | MAINTAINER Justin Paul 3 | 4 | ENV _SCRATCH /tmp/scratch 5 | ENV ORA_HOME /u01/app/oracle 6 | ENV JDK_HOME ${ORA_HOME}/product/jdk 7 | ENV FMW_HOME ${ORA_HOME}/product/fmw 8 | ENV ADM_HOME ${ORA_HOME}/admin 9 | 10 | COPY jdk ${_SCRATCH}/jdk/ 11 | COPY wls ${_SCRATCH}/wls/ 12 | COPY rcu ${_SCRATCH}/rcu/ 13 | COPY wcc ${_SCRATCH}/wcc/ 14 | COPY wcp ${_SCRATCH}/wcp/ 15 | COPY domain ${_SCRATCH}/domain/ 16 | COPY scripts ${_SCRATCH}/scripts/ 17 | 18 | RUN yum update -y -q && \ 19 | yum install -y -q binutils compat-libcap1 compat-libstdc++-33 \ 20 | compat-libstdc++-33.i686 gcc gcc-c++ glibc glibc-devel glibc-devel.i686 \ 21 | libaio libaio-devel libgcc libgcc.i686 libstdc++ libstdc++.i686 \ 22 | libstdc++-devel libXext libXtst libXi openmotif openmotif22 redhat-lsb \ 23 | sysstat zlib zlib.i686 libX11 libX11.i686 unzip xorg-x11-utils xorg-x11-xauth && \ 24 | groupadd -g 1000 oinstall && \ 25 | useradd -u 1000 -g 1000 -m oracle && \ 26 | mkdir -p ${ORA_HOME} && \ 27 | chown -R oracle:oinstall ${_SCRATCH} && \ 28 | chown -R oracle:oinstall ${ORA_HOME} 29 | 30 | USER oracle 31 | 32 | RUN unzip -qq ${_SCRATCH}/jdk/p21984104_17091_Linux-x86-64.zip -d ${_SCRATCH}/jdk && \ 33 | mkdir -p ${JDK_HOME} && \ 34 | tar xzf ${_SCRATCH}/jdk/jdk-7u91-linux-x64.tar.gz -C ${JDK_HOME} --strip-components=1 && \ 35 | rm -rf ${_SCRATCH}/jdk && \ 36 | mkdir -p ${FMW_HOME} && \ 37 | ${JDK_HOME}/bin/java -jar ${_SCRATCH}/wls/wls1036_generic.jar -mode=silent \ 38 | -silent_xml=${_SCRATCH}/wls/silent.xml && \ 39 | rm -rf ${_SCRATCH}/wls/wls1036_generic.jar ${_SCRATCH}/wls/silent.xml && \ 40 | unzip -qq ${_SCRATCH}/rcu/ofm_rcu_linux_11.1.1.9.0_64_disk1_1of1.zip -d ${FMW_HOME} && \ 41 | rm -rf ${_SCRATCH}/rcu/ofm_rcu_linux_11.1.1.9.0_64_disk1_1of1.zip && \ 42 | echo "inventory_loc=${FMW_HOME}/oraInventory" > ${_SCRATCH}/oraInst.loc && \ 43 | echo "inst_group=oinstall" >> ${_SCRATCH}/oraInst.loc && \ 44 | unzip -qq ${_SCRATCH}/wcp/ofm_wc_generic_11.1.1.9.0_disk1_1of2.zip -d ${_SCRATCH}/wcp && \ 45 | unzip -qq ${_SCRATCH}/wcp/ofm_wc_generic_11.1.1.9.0_disk1_2of2.zip -d ${_SCRATCH}/wcp && \ 46 | rm -rf rm -rf ${_SCRATCH}/wcp/ofm_wc_generic_11.1.1.9.0_disk1_1of2.zip \ 47 | ${_SCRATCH}/wcp/ofm_wc_generic_11.1.1.9.0_disk1_2of2.zip && \ 48 | ${_SCRATCH}/wcp/Disk1/runInstaller -silent -invPtrLoc ${_SCRATCH}/oraInst.loc \ 49 | -responseFile ${_SCRATCH}/wcp/Disk1/stage/Response/sampleResponse_wls.rsp -jreLoc ${JDK_HOME} \ 50 | -waitforcompletion -force -novalidation MIDDLEWARE_HOME=${FMW_HOME} \ 51 | ORACLE_HOME=${FMW_HOME}/Oracle_WC1 && \ 52 | rm -rf ${_SCRATCH}/wcp/Disk* && \ 53 | unzip -qq ${_SCRATCH}/wcc/ofm_wcc_generic_11.1.1.9.0_disk1_1of2.zip -d ${_SCRATCH}/wcc && \ 54 | unzip -qq ${_SCRATCH}/wcc/ofm_wcc_generic_11.1.1.9.0_disk1_2of2.zip -d ${_SCRATCH}/wcc && \ 55 | rm -rf rm -rf ${_SCRATCH}/wcc/ofm_wcc_generic_11.1.1.9.0_disk1_1of2.zip \ 56 | ${_SCRATCH}/wcc/ofm_wcc_generic_11.1.1.9.0_disk1_2of2.zip && \ 57 | ${_SCRATCH}/wcc/Disk1/runInstaller -silent -invPtrLoc ${_SCRATCH}/oraInst.loc \ 58 | -responseFile ${_SCRATCH}/wcc/Disk1/stage/Response/sampleResponse_wls.rsp -jreLoc ${JDK_HOME} \ 59 | -waitforcompletion -force -novalidation MIDDLEWARE_HOME=${FMW_HOME} \ 60 | ORACLE_HOME=${FMW_HOME}/Oracle_ECM1 && \ 61 | rm -rf ${_SCRATCH}/wcc/Disk* && \ 62 | mkdir -p ${ADM_HOME}/tools/templates && \ 63 | mkdir -p ${ADM_HOME}/tools/scripts && \ 64 | cp ${_SCRATCH}/domain/* ${ADM_HOME}/tools/templates && \ 65 | cp -r ${_SCRATCH}/scripts/* ${ADM_HOME}/tools/scripts && \ 66 | rm -rf ${_SCRATCH}/domain ${_SCRATCH}/scripts 67 | 68 | RUN rm -rf ${_SCRATCH} 69 | 70 | CMD /bin/bash 71 | -------------------------------------------------------------------------------- /Docker - Oracle WebCenter 11g/Dockerfile.latest: -------------------------------------------------------------------------------- 1 | FROM oracle/webcenter:11.1.1.9.0 2 | MAINTAINER Justin Paul 3 | 4 | COPY wls wcc wcp ${_SCRATCH}/patches/ 5 | 6 | USER root 7 | 8 | RUN yum update -y -q && \ 9 | chown -R oracle:oinstall ${_SCRATCH} 10 | 11 | USER oracle 12 | 13 | RUN mkdir -p ${FMW_HOME}/utils/bsu/cache_dir && \ 14 | unzip -qq ${_SCRATCH}/patches/p20780171_1036_Generic.zip -d ${FMW_HOME}/utils/bsu/cache_dir && \ 15 | cd ${FMW_HOME}/utils/bsu && \ 16 | sed -i 's/-Xmx512m/-Xmx1024m/g' ${FMW_HOME}/utils/bsu/bsu.sh && \ 17 | ${FMW_HOME}/utils/bsu/bsu.sh -prod_dir=${FMW_HOME}/wlserver_10.3 -patchlist=EJUW -verbose -install && \ 18 | rm -rf ${_SCRATCH}/patches/p20780171_1036_Generic.zip && \ 19 | cd && \ 20 | unzip -qq ${_SCRATCH}/patches/p21950042_111190_Generic.zip -d ${_SCRATCH}/patches && \ 21 | ${FMW_HOME}/oracle_common/OPatch/opatch apply -silent ${_SCRATCH}/patches/21950042 && \ 22 | ${FMW_HOME}/Oracle_WC1/OPatch/opatch apply -silent ${_SCRATCH}/patches/21950042 && \ 23 | rm -rf ${_SCRATCH}/patches/p21950042_111190_Generic.zip ${_SCRATCH}/patches/21950042 && \ 24 | unzip -qq ${_SCRATCH}/patches/p22060967_111190_Generic.zip -d ${_SCRATCH}/patches && \ 25 | ${FMW_HOME}/Oracle_ECM1/OPatch/opatch apply -silent ${_SCRATCH}/patches/22060967 && \ 26 | rm -rf ${_SCRATCH}/patches/p22060967_111190_Generic.zip ${_SCRATCH}/patches/22060967 && \ 27 | unzip -qq ${_SCRATCH}/patches/p22249978_111190_Generic.zip -d ${_SCRATCH}/patches && \ 28 | ${FMW_HOME}/Oracle_ECM1/OPatch/opatch apply -silent ${_SCRATCH}/patches/ECM_22249978 && \ 29 | rm -rf ${_SCRATCH}/patches/p22249978_111190_Generic.zip ${_SCRATCH}/patches/ECM_22249978 30 | 31 | RUN rm -rf ${_SCRATCH} 32 | 33 | CMD /bin/bash 34 | -------------------------------------------------------------------------------- /Docker - Oracle WebCenter 11g/README: -------------------------------------------------------------------------------- 1 | Docker Images for Oracle WebCenter Portal & Content (11.1.1.9.0) 2 | Version: 1.0.0 3 | Updated: 12/21/2015 4 | -------------------------------------------------------------------- 5 | 6 | This project contains the Dockerfiles and the corresponding directory structures 7 | needed to build Docker containers for WebCenter Portal and Content. 8 | 9 | To build an image for use, follow the instructions below: 10 | 11 | 1. Create a base directory for your Docker context. 12 | mkdir ~/webcenter 13 | 14 | 2. Create the following directories under the Docker context directory. You may 15 | not need all of these directories depending on the image you are trying to 16 | build. 17 | cd ~/webcenter 18 | mkdir jdk wls rcu wcc wcp 19 | 20 | 3. Download the required software packages into the directories we created in 21 | the previous step. At the time of the creation of this README, the following 22 | installers and patched were available. The instruction on where to download 23 | these files are in READMEs in those directories. 24 | ~/webcenter/jdk/p21984104_17091_Linux-x86-64.zip 25 | ~/webcenter/wls/wls1036_generic.jar 26 | ~/webcenter/wls/p20780171_1036_Generic.zip 27 | ~/webcenter/wls/silent.xml 28 | ~/webcenter/rcu/ofm_rcu_linux_11.1.1.9.0_64_disk1_1of1.zip 29 | ~/webcenter/wcc/ofm_wcc_generic_11.1.1.9.0_disk1_1of2.zip 30 | ~/webcenter/wcc/ofm_wcc_generic_11.1.1.9.0_disk1_2of2.zip 31 | ~/webcenter/wcc/p22060967_111190_Generic.zip 32 | ~/webcenter/wcc/p22249978_111190_Generic.zip 33 | ~/webcenter/wcc/Dockerfile.11.1.1.9.0 34 | ~/webcenter/wcc/Dockerfile.11.1.1.9.5 35 | ~/webcenter/wcp/ofm_wc_generic_11.1.1.9.0_disk1_1of2.zip 36 | ~/webcenter/wcp/ofm_wc_generic_11.1.1.9.0_disk1_2of2.zip 37 | ~/webcenter/wcp/p21950042_111190_Generic.zip 38 | ~/webcenter/wcp/Dockerfile.11.1.1.9.0 39 | ~/webcenter/wcp/Dockerfile.11.1.1.9.8 40 | ~/webcenter/Dockerfile.11.1.1.9.0 41 | ~/webcenter/Dockerfile.latest 42 | ~/webcenter/domain/* 43 | ~/webcenter/scripts/* 44 | 45 | 4. Make sure that all the files have the appropriate permissions. 46 | chmod -R go+r ~/webcenter 47 | 48 | 5. Place the Dockerfile for the image you want to build in the base directory. 49 | ~/webcenter/Dockerfile.11.1.1.9.0 50 | Java JDK 1.7.0_91 51 | RCU 11.1.1.9.0 52 | WebLogic 10.3.6.0.0 53 | WebCenter Content 11.1.1.9.0 54 | WebCenter Portal 11.1.1.9.0 55 | 56 | ~/webcenter/Dockerfile.latest 57 | Java JDK 1.7.0_91 58 | RCU 11.1.1.9.0 59 | WebLogic 10.3.6.0.12 60 | WebCenter Content 11.1.1.9.5 61 | WebCenter Portal 11.1.1.9.8 62 | 63 | ~/webcenter/wcc/Dockerfile.11.1.1.9.0 64 | Java JDK 1.7.0_91 65 | RCU 11.1.1.9.0 66 | WebLogic 10.3.6.0.0 67 | WebCenter Content 11.1.1.9.0 68 | 69 | ~/webcenter/wcc/Dockerfile.11.1.1.9.5 70 | Java JDK 1.7.0_91 71 | RCU 11.1.1.9.0 72 | WebLogic 10.3.6.0.12 73 | WebCenter Content 11.1.1.9.5 74 | 75 | ~/webcenter/wcp/Dockerfile.11.1.1.9.0 76 | Java JDK 1.7.0_91 77 | RCU 11.1.1.9.0 78 | WebLogic 10.3.6.0.0 79 | WebCenter Portal 11.1.1.9.0 80 | 81 | ~/webcenter/wcp/Dockerfile.11.1.1.9.8 82 | Java JDK 1.7.0_91 83 | RCU 11.1.1.9.0 84 | WebLogic 10.3.6.0.12 85 | WebCenter Portal 11.1.1.9.8 86 | 87 | 6. Run the appropriate command to build your image. Use --no-cache=true if you 88 | do not want to cache intermediate images. 89 | cd ~/webcenter 90 | docker build -t oracle/webcenter:11.1.1.9.0 -f ~/webcenter/Dockerfile.11.1.1.9.0 . 91 | docker build -t oracle/webcenter:latest -f ~/webcenter/Dockerfile.latest . 92 | docker build -t oracle/webcenter/content:11.1.1.9.0 -f ~/webcenter/wcc/Dockerfile.11.1.1.9.0 . 93 | docker build -t oracle/webcenter/content:11.1.1.9.5 -f ~/webcenter/wcc/Dockerfile.11.1.1.9.5 . 94 | docker build -t oracle/webcenter/portal:11.1.1.9.0 -f ~/webcenter/wcp/Dockerfile.11.1.1.9.0 . 95 | docker build -t oracle/webcenter/portal:11.1.1.9.8 -f ~/webcenter/wcp/Dockerfile.11.1.1.9.8 . 96 | 97 | 7. After your image(s) are built, you can start creating the containers. 98 | Note that the you will need to have a shared volume between all the 99 | containers. This is where the admin domain will reside. You may choose 100 | to mount the volume with RW permissions on the admin container and mount 101 | the volume with R permissions on the managed server containers. 102 | 103 | 8. To start a container running the admin server, run the following command: 104 | docker run -d -P --name=adminserver \ 105 | -v /Volumes/aserver:/u01/app/oracle/admin/aserver:rw \ 106 | -t oracle/webcenter:latest /bin/sh /u01/app/oracle/admin/tools/scripts/start_server.sh \ 107 | adminserver 108 | 109 | 9. After the container has started and the Admin Server is up, login to the 110 | Admin Console and update all the data sources that you intend to use with 111 | the correct values for the JDBC URL, username and password. No restart of 112 | the Admin Server will be required as no data sources are targeted to it. 113 | RCU is packaged within the docker image so you can start an interactive 114 | container and run the RCU in command line mode. 115 | 116 | 10. To start a container running a managed server, run the following command: 117 | docker run -d -P --name=mserver_${SERVICE} \ 118 | -v /Volumes/aserver:/u01/app/oracle/admin/aserver:ro \ 119 | -t oracle/webcenter:latest /bin/sh /u01/app/oracle/admin/tools/scripts/start_server.sh \ 120 | ${SERVICE_ID} ${ADMIN_SERVER_URL} 121 | 122 | SERVICE - Any name to identify the container with the service you are 123 | running on it 124 | SERVICE_ID - can be any one of the following: capture, ibr, ipm, irm, ssxa, 125 | ucm, urm, collaboration, portlet, spaces, utilities 126 | ADMIN_SERVER_URL - t3://${IP_ADDRESS_OF_ADMIN_CONTAINER}:7001 127 | -------------------------------------------------------------------------------- /Docker - Oracle WebCenter 11g/domain/README: -------------------------------------------------------------------------------- 1 | Required Files: docker_domain_admin.jar 2 | docker_domain_managed.jar 3 | 4 | These are the domain templates that can be either unpacked or user within 5 | config.sh to create a new domain based on it. 6 | 7 | Also make sure that the file has appropriate file permissions 8 | 9 | chmod -R go+r * -------------------------------------------------------------------------------- /Docker - Oracle WebCenter 11g/domain/docker_domain_admin.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freneticdisc/oracle-blog-examples/8889facfa95406c963e6241e427751509fc49b32/Docker - Oracle WebCenter 11g/domain/docker_domain_admin.jar -------------------------------------------------------------------------------- /Docker - Oracle WebCenter 11g/domain/docker_domain_full_12172015_180612.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freneticdisc/oracle-blog-examples/8889facfa95406c963e6241e427751509fc49b32/Docker - Oracle WebCenter 11g/domain/docker_domain_full_12172015_180612.jar -------------------------------------------------------------------------------- /Docker - Oracle WebCenter 11g/domain/docker_domain_managed.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freneticdisc/oracle-blog-examples/8889facfa95406c963e6241e427751509fc49b32/Docker - Oracle WebCenter 11g/domain/docker_domain_managed.jar -------------------------------------------------------------------------------- /Docker - Oracle WebCenter 11g/jdk/README: -------------------------------------------------------------------------------- 1 | Login to My Oracle Support and download the file. 2 | 3 | URL: https://support.oracle.com/epmos/faces/PatchResultsNDetails?patchId=21984104 4 | 5 | Downloaded Files: p21984104_17091_Linux-x86-64.zip 6 | 7 | Also make sure that the file has appropriate file permissions 8 | 9 | chmod -R go+r * -------------------------------------------------------------------------------- /Docker - Oracle WebCenter 11g/rcu/README: -------------------------------------------------------------------------------- 1 | Login to Oracle Technology Network and download the file. 2 | 3 | URL: http://download.oracle.com/otn/linux/middleware/11g/111190/ofm_rcu_linux_11.1.1.9.0_64_disk1_1of1.zip 4 | Page: http://www.oracle.com/technetwork/middleware/webcenter/content/downloads/wcc-11g-downloads-2734036.html 5 | 6 | Downloaded Files: ofm_rcu_linux_11.1.1.9.0_64_disk1_1of1.zip 7 | 8 | Also make sure that the file has appropriate file permissions 9 | 10 | chmod -R go+r * -------------------------------------------------------------------------------- /Docker - Oracle WebCenter 11g/scripts/README: -------------------------------------------------------------------------------- 1 | All scripts are located in this directory and are necessary. 2 | 3 | Also make sure that the file has appropriate file permissions. 4 | 5 | chmod -R go+r * -------------------------------------------------------------------------------- /Docker - Oracle WebCenter 11g/scripts/add_server.py: -------------------------------------------------------------------------------- 1 | print 'Number of arguments:', len(sys.argv), 'arguments.' 2 | print 'Argument List:', str(sys.argv) 3 | 4 | servermap = { 5 | "capture": {"Port": 16400, "Cluster": "wcc_capture_cluster1"}, 6 | "ibr": {"Port": 16250, "Cluster": "wcc_ibr_cluster1"}, 7 | "ipm": {"Port": 16000, "Cluster": "wcc_ipm_cluster1"}, 8 | "irm": {"Port": 16100, "Cluster": "wcc_irm_cluster1"}, 9 | "ssxa": {"Port": 16290, "Cluster": "wcc_ssxa_cluster1"}, 10 | "ucm": {"Port": 16200, "Cluster": "wcc_ucm_cluster1"}, 11 | "urm": {"Port": 16300, "Cluster": "wcc_urm_cluster1"}, 12 | "collaboration": {"Port": 8890, "Cluster": "wcp_collaboration_cluster1"}, 13 | "portlet": {"Port": 8889, "Cluster": "wcp_portlet_cluster1"}, 14 | "spaces": {"Port": 8888, "Cluster": "wcp_spaces_cluster1"}, 15 | "utilities": {"Port": 8891, "Cluster": "wcp_utilities_cluster1"} 16 | } 17 | 18 | connect(sys.argv[1], sys.argv[2], sys.argv[5]) 19 | edit() 20 | startEdit() 21 | servername = sys.argv[4] 22 | clustername = servermap.get(sys.argv[3], {}).get("Cluster", None) 23 | port = servermap.get(sys.argv[3], {}).get("Port", 7001) 24 | 25 | try: 26 | if clustername not in (None, ""): 27 | cd('/Clusters/' + clustername) 28 | cluster = cmo 29 | 30 | cd("/") 31 | cmo.createServer(servername) 32 | cd('/Servers/' + servername) 33 | cmo.setListenAddress("") 34 | cmo.setListenPort(port) 35 | 36 | if clustername not in (None, ""): 37 | cmo.setCluster(cluster) 38 | 39 | activate() 40 | except: 41 | cancelEdit("y") 42 | 43 | disconnect() 44 | exit() 45 | -------------------------------------------------------------------------------- /Docker - Oracle WebCenter 11g/scripts/start_server.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | SERVER_ID=${1} 4 | ADMIN_URL=${2} 5 | ADMIN_USERNAME=weblogic 6 | ADMIN_PASSWORD=welcome1 7 | SERVER_NAME=${SERVER_ID}-$(hostname -s) 8 | 9 | export DOMAIN_NAME=docker_domain 10 | 11 | case "${SERVER_ID}" in 12 | adminserver) 13 | if [ -d ${ADM_HOME}/aserver/${DOMAIN_NAME} ] 14 | then 15 | echo "Admin Domain Directory Exists." 16 | else 17 | echo "Admin Domain Directory does NOT exist. Unpacking the domain from the available template..." 18 | ${FMW_HOME}/oracle_common/common/bin/unpack.sh \ 19 | -template=${ADM_HOME}/tools/templates/${DOMAIN_NAME}_admin.jar \ 20 | -domain=${ADM_HOME}/aserver/${DOMAIN_NAME} \ 21 | -app_dir=${ADM_HOME}/aserver/${DOMAIN_NAME} 22 | fi 23 | echo "Starting the Admin Server." 24 | ${ADM_HOME}/aserver/${DOMAIN_NAME}/startWebLogic.sh 25 | ;; 26 | *) 27 | if [ -d ${ADM_HOME}/mserver/${DOMAIN_NAME} ] 28 | then 29 | echo "Managed Domain Directory Exists." 30 | echo "Starting the Managed Server." 31 | ${ADM_HOME}/mserver/${DOMAIN_NAME}/bin/startManagedWebLogic.sh ${SERVER_NAME} ${ADMIN_URL} 32 | else 33 | echo "Managed Domain Directory does NOT exist." 34 | echo "Creating a managed server domain template from the admin server." 35 | if [ -d ${ADM_HOME}/aserver/${DOMAIN_NAME} ] 36 | then 37 | ${FMW_HOME}/oracle_common/common/bin/pack.sh \ 38 | -template=${ADM_HOME}/tools/templates/${DOMAIN_NAME}_managed.jar \ 39 | -domain=${ADM_HOME}/aserver/${DOMAIN_NAME} \ 40 | -template_name="${DOMAIN_NAME} Domain for Managed Servers" \ 41 | -template_author="Justin Paul" -managed=true 42 | 43 | echo "Unpacking the domain from the available template." 44 | ${FMW_HOME}/oracle_common/common/bin/unpack.sh \ 45 | -template=${ADM_HOME}/tools/templates/${DOMAIN_NAME}_managed.jar \ 46 | -domain=${ADM_HOME}/mserver/${DOMAIN_NAME} \ 47 | -app_dir=${ADM_HOME}/mserver/${DOMAIN_NAME} 48 | 49 | ${FMW_HOME}/oracle_common/common/bin/wlst.sh \ 50 | ${ADM_HOME}/tools/scripts/add_server.py ${ADMIN_USERNAME} ${ADMIN_PASSWORD} ${SERVER_ID} ${SERVER_NAME} ${ADMIN_URL} 51 | mkdir -p ${ADM_HOME}/mserver/${DOMAIN_NAME}/servers/${SERVER_NAME}/security 52 | echo "username=${ADMIN_USERNAME}" > ${ADM_HOME}/mserver/${DOMAIN_NAME}/servers/${SERVER_NAME}/security/boot.properties 53 | echo "password=${ADMIN_PASSWORD}" >> ${ADM_HOME}/mserver/${DOMAIN_NAME}/servers/${SERVER_NAME}/security/boot.properties 54 | 55 | echo "Starting the Managed Server." 56 | ${ADM_HOME}/mserver/${DOMAIN_NAME}/bin/startManagedWebLogic.sh ${SERVER_NAME} ${ADMIN_URL} 57 | else 58 | echo "ERROR: Admin Server Directory and ${DOMAIN_NAME} domain was not found." 59 | echo "This procedure cannot continue." 60 | fi 61 | fi 62 | ;; 63 | esac 64 | -------------------------------------------------------------------------------- /Docker - Oracle WebCenter 11g/wcc/Dockerfile.11.1.1.9.0: -------------------------------------------------------------------------------- 1 | FROM oraclelinux:6 2 | MAINTAINER Justin Paul 3 | 4 | ENV _SCRATCH /tmp/scratch 5 | ENV ORA_HOME /u01/app/oracle 6 | ENV JDK_HOME ${ORA_HOME}/product/jdk 7 | ENV FMW_HOME ${ORA_HOME}/product/fmw 8 | ENV ADM_HOME ${ORA_HOME}/admin 9 | 10 | COPY jdk ${_SCRATCH}/jdk/ 11 | COPY wls ${_SCRATCH}/wls/ 12 | COPY rcu ${_SCRATCH}/rcu/ 13 | COPY wcc ${_SCRATCH}/wcc/ 14 | COPY wcp ${_SCRATCH}/wcp/ 15 | COPY domain ${_SCRATCH}/domain/ 16 | COPY scripts ${_SCRATCH}/scripts/ 17 | 18 | RUN yum update -y -q && \ 19 | yum install -y -q binutils compat-libcap1 compat-libstdc++-33 \ 20 | compat-libstdc++-33.i686 gcc gcc-c++ glibc glibc-devel glibc-devel.i686 \ 21 | libaio libaio-devel libgcc libgcc.i686 libstdc++ libstdc++.i686 \ 22 | libstdc++-devel libXext libXtst libXi openmotif openmotif22 redhat-lsb \ 23 | sysstat zlib zlib.i686 libX11 libX11.i686 unzip xorg-x11-utils xorg-x11-xauth && \ 24 | groupadd -g 1000 oinstall && \ 25 | useradd -u 1000 -g 1000 -m oracle && \ 26 | mkdir -p ${ORA_HOME} && \ 27 | chown -R oracle:oinstall ${_SCRATCH} && \ 28 | chown -R oracle:oinstall ${ORA_HOME} 29 | 30 | USER oracle 31 | 32 | RUN unzip -qq ${_SCRATCH}/jdk/p21984104_17091_Linux-x86-64.zip -d ${_SCRATCH}/jdk && \ 33 | mkdir -p ${JDK_HOME} && \ 34 | tar xzf ${_SCRATCH}/jdk/jdk-7u91-linux-x64.tar.gz -C ${JDK_HOME} --strip-components=1 && \ 35 | rm -rf ${_SCRATCH}/jdk && \ 36 | mkdir -p ${FMW_HOME} && \ 37 | ${JDK_HOME}/bin/java -jar ${_SCRATCH}/wls/wls1036_generic.jar -mode=silent \ 38 | -silent_xml=${_SCRATCH}/wls/silent.xml && \ 39 | rm -rf ${_SCRATCH}/wls/wls1036_generic.jar ${_SCRATCH}/wls/silent.xml && \ 40 | unzip -qq ${_SCRATCH}/rcu/ofm_rcu_linux_11.1.1.9.0_64_disk1_1of1.zip -d ${FMW_HOME} && \ 41 | rm -rf ${_SCRATCH}/rcu/ofm_rcu_linux_11.1.1.9.0_64_disk1_1of1.zip && \ 42 | echo "inventory_loc=${FMW_HOME}/oraInventory" > ${_SCRATCH}/oraInst.loc && \ 43 | echo "inst_group=oinstall" >> ${_SCRATCH}/oraInst.loc && \ 44 | unzip -qq ${_SCRATCH}/wcc/ofm_wcc_generic_11.1.1.9.0_disk1_1of2.zip -d ${_SCRATCH}/wcc && \ 45 | unzip -qq ${_SCRATCH}/wcc/ofm_wcc_generic_11.1.1.9.0_disk1_2of2.zip -d ${_SCRATCH}/wcc && \ 46 | rm -rf rm -rf ${_SCRATCH}/wcc/ofm_wcc_generic_11.1.1.9.0_disk1_1of2.zip \ 47 | ${_SCRATCH}/wcc/ofm_wcc_generic_11.1.1.9.0_disk1_2of2.zip && \ 48 | ${_SCRATCH}/wcc/Disk1/runInstaller -silent -invPtrLoc ${_SCRATCH}/oraInst.loc \ 49 | -responseFile ${_SCRATCH}/wcc/Disk1/stage/Response/sampleResponse_wls.rsp -jreLoc ${JDK_HOME} \ 50 | -waitforcompletion -force -novalidation MIDDLEWARE_HOME=${FMW_HOME} \ 51 | ORACLE_HOME=${FMW_HOME}/Oracle_ECM1 && \ 52 | rm -rf ${_SCRATCH}/wcc/Disk* && \ 53 | mkdir -p ${ADM_HOME}/tools/templates && \ 54 | mkdir -p ${ADM_HOME}/tools/scripts && \ 55 | cp ${_SCRATCH}/domain/* ${ADM_HOME}/tools/templates && \ 56 | cp -r ${_SCRATCH}/scripts/* ${ADM_HOME}/tools/scripts && \ 57 | rm -rf ${_SCRATCH}/domain ${_SCRATCH}/scripts 58 | 59 | RUN rm -rf ${_SCRATCH} 60 | 61 | CMD /bin/bash 62 | -------------------------------------------------------------------------------- /Docker - Oracle WebCenter 11g/wcc/Dockerfile.11.1.1.9.5: -------------------------------------------------------------------------------- 1 | FROM oracle/webcenter/content:11.1.1.9.0 2 | MAINTAINER Justin Paul 3 | 4 | COPY wls wcc ${_SCRATCH}/patches/ 5 | 6 | USER root 7 | 8 | RUN yum update -y -q && \ 9 | chown -R oracle:oinstall ${_SCRATCH} 10 | 11 | USER oracle 12 | 13 | RUN mkdir -p ${FMW_HOME}/utils/bsu/cache_dir && \ 14 | unzip -qq ${_SCRATCH}/patches/p20780171_1036_Generic.zip -d ${FMW_HOME}/utils/bsu/cache_dir && \ 15 | cd ${FMW_HOME}/utils/bsu && \ 16 | sed -i 's/-Xmx512m/-Xmx1024m/g' ${FMW_HOME}/utils/bsu/bsu.sh && \ 17 | ${FMW_HOME}/utils/bsu/bsu.sh -prod_dir=${FMW_HOME}/wlserver_10.3 -patchlist=EJUW -verbose -install && \ 18 | rm -rf ${_SCRATCH}/patches/p20780171_1036_Generic.zip && \ 19 | cd && \ 20 | unzip -qq ${_SCRATCH}/patches/p22060967_111190_Generic.zip -d ${_SCRATCH}/patches && \ 21 | ${FMW_HOME}/Oracle_ECM1/OPatch/opatch apply -silent ${_SCRATCH}/patches/22060967 && \ 22 | rm -rf ${_SCRATCH}/patches/p22060967_111190_Generic.zip ${_SCRATCH}/patches/22060967 && \ 23 | unzip -qq ${_SCRATCH}/patches/p22249978_111190_Generic.zip -d ${_SCRATCH}/patches && \ 24 | ${FMW_HOME}/Oracle_ECM1/OPatch/opatch apply -silent ${_SCRATCH}/patches/ECM_22249978 && \ 25 | rm -rf ${_SCRATCH}/patches/p22249978_111190_Generic.zip ${_SCRATCH}/patches/ECM_22249978 26 | 27 | RUN rm -rf ${_SCRATCH} 28 | 29 | CMD /bin/bash 30 | -------------------------------------------------------------------------------- /Docker - Oracle WebCenter 11g/wcc/README: -------------------------------------------------------------------------------- 1 | Login to Oracle Technology Network and MOS and download the file. 2 | 3 | http://www.oracle.com/technetwork/middleware/webcenter/content/downloads/wcc-11g-downloads-2734036.html 4 | https://support.oracle.com 5 | 6 | Downloaded Files: ofm_wcc_generic_11.1.1.9.0_disk1_1of2.zip 7 | ofm_wcc_generic_11.1.1.9.0_disk1_2of2.zip 8 | p22060967_111190_Generic.zip 9 | p22249978_111190_Generic.zip 10 | 11 | Also make sure that the file has appropriate file permissions 12 | 13 | chmod -R go+r * -------------------------------------------------------------------------------- /Docker - Oracle WebCenter 11g/wcp/Dockerfile.11.1.1.9.0: -------------------------------------------------------------------------------- 1 | FROM oraclelinux:6 2 | MAINTAINER Justin Paul 3 | 4 | ENV _SCRATCH /tmp/scratch 5 | ENV ORA_HOME /u01/app/oracle 6 | ENV JDK_HOME ${ORA_HOME}/product/jdk 7 | ENV FMW_HOME ${ORA_HOME}/product/fmw 8 | ENV ADM_HOME ${ORA_HOME}/admin 9 | 10 | COPY jdk ${_SCRATCH}/jdk/ 11 | COPY wls ${_SCRATCH}/wls/ 12 | COPY rcu ${_SCRATCH}/rcu/ 13 | COPY wcp ${_SCRATCH}/wcp/ 14 | COPY domain ${_SCRATCH}/domain/ 15 | COPY scripts ${_SCRATCH}/scripts/ 16 | 17 | RUN yum update -y -q && \ 18 | yum install -y -q binutils compat-libcap1 compat-libstdc++-33 \ 19 | compat-libstdc++-33.i686 gcc gcc-c++ glibc glibc-devel glibc-devel.i686 \ 20 | libaio libaio-devel libgcc libgcc.i686 libstdc++ libstdc++.i686 \ 21 | libstdc++-devel libXext libXtst libXi openmotif openmotif22 redhat-lsb \ 22 | sysstat zlib zlib.i686 libX11 libX11.i686 unzip xorg-x11-utils xorg-x11-xauth && \ 23 | groupadd -g 1000 oinstall && \ 24 | useradd -u 1000 -g 1000 -m oracle && \ 25 | mkdir -p ${ORA_HOME} && \ 26 | chown -R oracle:oinstall ${_SCRATCH} && \ 27 | chown -R oracle:oinstall ${ORA_HOME} 28 | 29 | USER oracle 30 | 31 | RUN unzip -qq ${_SCRATCH}/jdk/p21984104_17091_Linux-x86-64.zip -d ${_SCRATCH}/jdk && \ 32 | mkdir -p ${JDK_HOME} && \ 33 | tar xzf ${_SCRATCH}/jdk/jdk-7u91-linux-x64.tar.gz -C ${JDK_HOME} --strip-components=1 && \ 34 | rm -rf ${_SCRATCH}/jdk && \ 35 | mkdir -p ${FMW_HOME} && \ 36 | ${JDK_HOME}/bin/java -jar ${_SCRATCH}/wls/wls1036_generic.jar -mode=silent \ 37 | -silent_xml=${_SCRATCH}/wls/silent.xml && \ 38 | rm -rf ${_SCRATCH}/wls/wls1036_generic.jar ${_SCRATCH}/wls/silent.xml && \ 39 | unzip -qq ${_SCRATCH}/rcu/ofm_rcu_linux_11.1.1.9.0_64_disk1_1of1.zip -d ${FMW_HOME} && \ 40 | rm -rf ${_SCRATCH}/rcu/ofm_rcu_linux_11.1.1.9.0_64_disk1_1of1.zip && \ 41 | echo "inventory_loc=${FMW_HOME}/oraInventory" > ${_SCRATCH}/oraInst.loc && \ 42 | echo "inst_group=oinstall" >> ${_SCRATCH}/oraInst.loc && \ 43 | unzip -qq ${_SCRATCH}/wcp/ofm_wc_generic_11.1.1.9.0_disk1_1of2.zip -d ${_SCRATCH}/wcp && \ 44 | unzip -qq ${_SCRATCH}/wcp/ofm_wc_generic_11.1.1.9.0_disk1_2of2.zip -d ${_SCRATCH}/wcp && \ 45 | rm -rf rm -rf ${_SCRATCH}/wcp/ofm_wc_generic_11.1.1.9.0_disk1_1of2.zip \ 46 | ${_SCRATCH}/wcp/ofm_wc_generic_11.1.1.9.0_disk1_2of2.zip && \ 47 | ${_SCRATCH}/wcp/Disk1/runInstaller -silent -invPtrLoc ${_SCRATCH}/oraInst.loc \ 48 | -responseFile ${_SCRATCH}/wcp/Disk1/stage/Response/sampleResponse_wls.rsp -jreLoc ${JDK_HOME} \ 49 | -waitforcompletion -force -novalidation MIDDLEWARE_HOME=${FMW_HOME} \ 50 | ORACLE_HOME=${FMW_HOME}/Oracle_WC1 && \ 51 | rm -rf ${_SCRATCH}/wcp/Disk* && \ 52 | mkdir -p ${ADM_HOME}/tools/templates && \ 53 | mkdir -p ${ADM_HOME}/tools/scripts && \ 54 | cp ${_SCRATCH}/domain/* ${ADM_HOME}/tools/templates && \ 55 | cp -r ${_SCRATCH}/scripts/* ${ADM_HOME}/tools/scripts && \ 56 | rm -rf ${_SCRATCH}/domain ${_SCRATCH}/scripts 57 | 58 | RUN rm -rf ${_SCRATCH} 59 | 60 | CMD /bin/bash 61 | -------------------------------------------------------------------------------- /Docker - Oracle WebCenter 11g/wcp/Dockerfile.11.1.1.9.8: -------------------------------------------------------------------------------- 1 | FROM oracle/webcenter/portal:11.1.1.9.0 2 | MAINTAINER Justin Paul 3 | 4 | COPY wls wcp ${_SCRATCH}/patches/ 5 | 6 | USER root 7 | 8 | RUN yum update -y -q && \ 9 | chown -R oracle:oinstall ${_SCRATCH} 10 | 11 | USER oracle 12 | 13 | RUN mkdir -p ${FMW_HOME}/utils/bsu/cache_dir && \ 14 | unzip -qq ${_SCRATCH}/patches/p20780171_1036_Generic.zip -d ${FMW_HOME}/utils/bsu/cache_dir && \ 15 | cd ${FMW_HOME}/utils/bsu && \ 16 | sed -i 's/-Xmx512m/-Xmx1024m/g' ${FMW_HOME}/utils/bsu/bsu.sh && \ 17 | ${FMW_HOME}/utils/bsu/bsu.sh -prod_dir=${FMW_HOME}/wlserver_10.3 -patchlist=EJUW -verbose -install && \ 18 | rm -rf ${_SCRATCH}/patches/p20780171_1036_Generic.zip && \ 19 | cd && \ 20 | unzip -qq ${_SCRATCH}/patches/p21950042_111190_Generic.zip -d ${_SCRATCH}/patches && \ 21 | ${FMW_HOME}/oracle_common/OPatch/opatch apply -silent ${_SCRATCH}/patches/21950042 && \ 22 | ${FMW_HOME}/Oracle_WC1/OPatch/opatch apply -silent ${_SCRATCH}/patches/21950042 && \ 23 | rm -rf ${_SCRATCH}/patches/p21950042_111190_Generic.zip ${_SCRATCH}/patches/21950042 24 | 25 | RUN rm -rf ${_SCRATCH} 26 | 27 | CMD /bin/bash 28 | -------------------------------------------------------------------------------- /Docker - Oracle WebCenter 11g/wcp/README: -------------------------------------------------------------------------------- 1 | Login to Oracle Technology Network and download the file. 2 | 3 | http://www.oracle.com/technetwork/middleware/webcenter/portal/downloads/index.html 4 | https://support.oracle.com 5 | 6 | Downloaded Files: ofm_wc_generic_11.1.1.9.0_disk1_1of2.zip 7 | ofm_wc_generic_11.1.1.9.0_disk1_2of2.zip 8 | p21950042_111190_Generic.zip 9 | 10 | Also make sure that the file has appropriate file permissions 11 | 12 | chmod -R go+r * -------------------------------------------------------------------------------- /Docker - Oracle WebCenter 11g/wls/README: -------------------------------------------------------------------------------- 1 | Login to Oracle Technology Network and MOS and download the file. 2 | 3 | Page: http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-main-097127.html 4 | http://download.oracle.com/otn/nt/middleware/11g/wls/1036/wls1036_generic.jar 5 | https://support.oracle.com 6 | 7 | Downloaded Files: wls1036_generic.jar 8 | p20780171_1036_Generic.zip 9 | 10 | The silent.xml file is part of this project. 11 | 12 | Also make sure that the file has appropriate file permissions 13 | 14 | chmod -R go+r * -------------------------------------------------------------------------------- /Docker - Oracle WebCenter 11g/wls/silent.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /DragAndDropFileUploadHTML5/file_upload.htm: -------------------------------------------------------------------------------- 1 |  2 | 3 | Drag and Drop file Uploader for WebCenter Content 4 | 5 | 6 | 7 | 8 | 9 |
10 | 31 | 32 |
33 |
34 |

Metadata

35 |
36 |
37 | Enter the following metadata here. Other metadata like the document type and security group are set in the code. You can add those fields here if you want to. 38 |
39 |
 
40 |
41 |
42 | 43 | 44 |
45 |
46 | 47 | 48 |
49 |
50 |
51 |
52 |
53 |

File Uploader

54 |
55 |
56 |
57 |
58 |
59 | 61 |
62 |
63 |
64 |
65 | 66 |
67 | 68 | 69 | 70 | 71 | 74 | 75 | 76 | 77 | 78 |
File nameFile sizePercent uploadedData from Server
72 | No files selected. 73 |
79 |
80 |
81 | 82 | 197 |
198 | 199 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2015 Justin Paul 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/.adf/META-INF/adf-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/Model/Model.jpr: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/Model/Model.properties: -------------------------------------------------------------------------------- 1 | ServiceURL=https://oradocs-corp.documents.us2.oraclecloud.com/documents/api/1.1 2 | UserName=abc.def@ghi.com 3 | Password=mypassword#1 4 | BaseFolderID=self 5 | -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/Model/adfmsrc/META-INF/adfm.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/Model/adfmsrc/model/DataControls.dcx: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | 10 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/Model/classes/.data/Model.cdi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freneticdisc/oracle-blog-examples/8889facfa95406c963e6241e427751509fc49b32/OracleDocumentsCloudDataControlPart1/Model/classes/.data/Model.cdi -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/Model/classes/META-INF/adfm.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/Model/classes/Model.properties: -------------------------------------------------------------------------------- 1 | ServiceURL=https://oradocs-corp.documents.us2.oraclecloud.com/documents/api/1.1 2 | UserName=abc.def@ghi.com 3 | Password=mypassword#1 4 | BaseFolderID=self 5 | -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/Model/classes/model/DataControls.dcx: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | 10 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/Model/classes/model/Item.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freneticdisc/oracle-blog-examples/8889facfa95406c963e6241e427751509fc49b32/OracleDocumentsCloudDataControlPart1/Model/classes/model/Item.class -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/Model/classes/model/ItemsDC.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freneticdisc/oracle-blog-examples/8889facfa95406c963e6241e427751509fc49b32/OracleDocumentsCloudDataControlPart1/Model/classes/model/ItemsDC.class -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/Model/classes/model/Type.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freneticdisc/oracle-blog-examples/8889facfa95406c963e6241e427751509fc49b32/OracleDocumentsCloudDataControlPart1/Model/classes/model/Type.class -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/Model/public_html/WEB-INF/faces-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/Model/public_html/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | Faces Servlet 7 | javax.faces.webapp.FacesServlet 8 | 1 9 | 10 | 11 | Faces Servlet 12 | /faces/* 13 | 14 | 15 | -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/Model/src/model/Item.java: -------------------------------------------------------------------------------- 1 | /*############################################################################## 2 | # Created By: Justin Paul 3 | # Source: https://blogs.oracle.com/OracleWebCenterSuite 4 | # 5 | # NOTE: Please note that these code snippets should be used for development and 6 | # testing purposes only, as such it is unsupported and should not be used 7 | # on production environments. 8 | ##############################################################################*/ 9 | package model; 10 | 11 | public class Item { 12 | private Type ItemType; 13 | private String ID; 14 | private String ParentID; 15 | private String Name; 16 | private String OwnedBy; 17 | private String CreatedBy; 18 | private String ModifiedBy; 19 | private String CreatedTime; 20 | private String ModifiedTime; 21 | private Double Size; 22 | private Double ChildItemsCount; 23 | 24 | public Item() { 25 | super(); 26 | } 27 | 28 | public Item(Type ItemType, 29 | String ID, 30 | String Name, 31 | String OwnedBy, 32 | String CreatedBy, 33 | String ModifiedBy, 34 | String CreatedTime, 35 | String ModifiedTime, 36 | Double Size, 37 | Double ChildItemsCount) { 38 | super(); 39 | this.ItemType = ItemType; 40 | this.ID = ID; 41 | this.Name = Name; 42 | this.OwnedBy = OwnedBy; 43 | this.CreatedBy = CreatedBy; 44 | this.ModifiedBy = ModifiedBy; 45 | this.CreatedTime = CreatedTime; 46 | this.ModifiedTime = ModifiedTime; 47 | this.Size = Size; 48 | this.ChildItemsCount = ChildItemsCount; 49 | } 50 | 51 | public void setItemType(Type ItemType) { 52 | this.ItemType = ItemType; 53 | } 54 | 55 | public Type getItemType() { 56 | return ItemType; 57 | } 58 | 59 | public void setID(String ID) { 60 | this.ID = ID; 61 | } 62 | 63 | public String getID() { 64 | return ID; 65 | } 66 | 67 | public void setParentID(String ParentID) { 68 | this.ParentID = ParentID; 69 | } 70 | 71 | public String getParentID() { 72 | return ParentID; 73 | } 74 | 75 | public void setName(String Name) { 76 | this.Name = Name; 77 | } 78 | 79 | public String getName() { 80 | return Name; 81 | } 82 | 83 | public void setOwnedBy(String OwnedBy) { 84 | this.OwnedBy = OwnedBy; 85 | } 86 | 87 | public String getOwnedBy() { 88 | return OwnedBy; 89 | } 90 | 91 | public void setCreatedBy(String CreatedBy) { 92 | this.CreatedBy = CreatedBy; 93 | } 94 | 95 | public String getCreatedBy() { 96 | return CreatedBy; 97 | } 98 | 99 | public void setModifiedBy(String ModifiedBy) { 100 | this.ModifiedBy = ModifiedBy; 101 | } 102 | 103 | public String getModifiedBy() { 104 | return ModifiedBy; 105 | } 106 | 107 | public void setCreatedTime(String CreatedTime) { 108 | this.CreatedTime = CreatedTime; 109 | } 110 | 111 | public String getCreatedTime() { 112 | return CreatedTime; 113 | } 114 | 115 | public void setModifiedTime(String ModifiedTime) { 116 | this.ModifiedTime = ModifiedTime; 117 | } 118 | 119 | public String getModifiedTime() { 120 | return ModifiedTime; 121 | } 122 | 123 | public void setSize(Double Size) { 124 | this.Size = Size; 125 | } 126 | 127 | public Double getSize() { 128 | return Size; 129 | } 130 | 131 | public void setChildItemsCount(Double ChildItemsCount) { 132 | this.ChildItemsCount = ChildItemsCount; 133 | } 134 | 135 | public Double getChildItemsCount() { 136 | return ChildItemsCount; 137 | } 138 | 139 | public boolean isFile() { 140 | return (this.ItemType == Type.FILE) ? true : false; 141 | } 142 | 143 | public boolean isFolder() { 144 | return (this.ItemType == Type.FOLDER) ? true : false; 145 | } 146 | } 147 | -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/Model/src/model/ItemsDC.java: -------------------------------------------------------------------------------- 1 | /*############################################################################## 2 | # Created By: Justin Paul 3 | # Source: https://blogs.oracle.com/OracleWebCenterSuite 4 | # 5 | # NOTE: Please note that these code snippets should be used for development and 6 | # testing purposes only, as such it is unsupported and should not be used 7 | # on production environments. 8 | ##############################################################################*/ 9 | package model; 10 | 11 | import javax.ws.rs.core.UriBuilder; 12 | import com.sun.jersey.api.client.Client; 13 | import com.sun.jersey.api.client.ClientResponse; 14 | import com.sun.jersey.api.client.WebResource; 15 | import com.sun.jersey.api.client.config.ClientConfig; 16 | import com.sun.jersey.api.client.config.DefaultClientConfig; 17 | import java.io.ByteArrayInputStream; 18 | import java.util.List; 19 | import java.util.ArrayList; 20 | import java.util.ResourceBundle; 21 | import javax.xml.bind.DatatypeConverter; 22 | import javax.xml.parsers.DocumentBuilderFactory; 23 | import javax.xml.parsers.DocumentBuilder; 24 | import javax.xml.xpath.XPathFactory; 25 | import javax.xml.xpath.XPath; 26 | import javax.xml.xpath.XPathConstants; 27 | import javax.xml.xpath.XPathExpression; 28 | import org.w3c.dom.Document; 29 | import org.w3c.dom.NodeList; 30 | 31 | public class ItemsDC { 32 | private String serviceURL; 33 | private String userName; 34 | private String password; 35 | private String baseFolderID; 36 | 37 | public ItemsDC() { 38 | super(); 39 | ResourceBundle resources = ResourceBundle.getBundle("Model"); 40 | this.serviceURL = resources.getString("ServiceURL"); 41 | this.userName = resources.getString("UserName"); 42 | this.password = resources.getString("Password"); 43 | this.baseFolderID = resources.getString("BaseFolderID"); 44 | } 45 | 46 | public List listItemsInBaseFolder () { 47 | return listItemsInFolder(baseFolderID); 48 | } 49 | 50 | public List listItemsInFolder (String folderid) { 51 | List items = new ArrayList(); 52 | 53 | if (folderid == null || folderid.equals("")) { 54 | folderid = baseFolderID; 55 | } 56 | String sUrl = serviceURL + "/folders/" + folderid + "/items"; 57 | String authString = userName + ":" + password; 58 | byte[] bAuthString = authString.getBytes(); 59 | String encodedAuthString = "Basic " + DatatypeConverter.printBase64Binary(bAuthString); 60 | 61 | ClientConfig config = new DefaultClientConfig(); 62 | Client client = Client.create(config); 63 | WebResource service = client.resource(UriBuilder.fromUri(sUrl).build()); 64 | ClientResponse response = service. 65 | header("Authorization", encodedAuthString). 66 | header("Accept", "application/xml"). 67 | get(ClientResponse.class); 68 | 69 | if (response.getStatus() == ClientResponse.Status.OK.getStatusCode()) { 70 | byte[] xmlDoc = response.getEntity(String.class).getBytes(); 71 | 72 | try { 73 | DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); 74 | DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); 75 | 76 | Document doc = dBuilder.parse(new ByteArrayInputStream(xmlDoc)); 77 | doc.getDocumentElement().normalize(); 78 | 79 | XPathFactory xPathfactory = XPathFactory.newInstance(); 80 | XPath xpath = xPathfactory.newXPath(); 81 | 82 | Item item = new Item(); 83 | item.setItemType(Type.FOLDER); 84 | 85 | XPathExpression expr = xpath.compile("/resource/id"); 86 | item.setID((String) expr.evaluate(doc, XPathConstants.STRING)); 87 | item.setParentID(""); 88 | item.setName(".."); 89 | 90 | expr = xpath.compile("/resource/parentID"); 91 | item.setID((String) expr.evaluate(doc, XPathConstants.STRING)); 92 | 93 | expr = xpath.compile("/resource/ownedBy/displayName"); 94 | item.setOwnedBy((String) expr.evaluate(doc, XPathConstants.STRING)); 95 | 96 | expr = xpath.compile("/resource/createdBy/displayName"); 97 | item.setCreatedBy((String) expr.evaluate(doc, XPathConstants.STRING)); 98 | 99 | expr = xpath.compile("/resource/modifiedBy/displayName"); 100 | item.setModifiedBy((String) expr.evaluate(doc, XPathConstants.STRING)); 101 | 102 | expr = xpath.compile("/resource/createdTime"); 103 | item.setCreatedTime((String) expr.evaluate(doc, XPathConstants.STRING)); 104 | 105 | expr = xpath.compile("/resource/modifiedTime"); 106 | item.setModifiedTime((String) expr.evaluate(doc, XPathConstants.STRING)); 107 | 108 | expr = xpath.compile("/resource/size"); 109 | item.setSize((Double) expr.evaluate(doc, XPathConstants.NUMBER)); 110 | 111 | expr = xpath.compile("/resource/childItemsCount"); 112 | item.setChildItemsCount((Double) expr.evaluate(doc, XPathConstants.NUMBER)); 113 | 114 | if (item.getID() != null && !item.getID().equals("")) 115 | items.add(item); 116 | 117 | expr = xpath.compile("/resource/items/item"); 118 | NodeList nl = (NodeList) expr.evaluate(doc, XPathConstants.NODESET); 119 | 120 | for (int i = 1; i < nl.getLength() + 1; i++) { 121 | item = new Item(); 122 | expr = xpath.compile("/resource/items/item[" + i + "]/type"); 123 | item.setItemType((expr.evaluate(doc, XPathConstants.STRING).equals("folder") ? Type.FOLDER : Type.FILE)); 124 | expr = xpath.compile("/resource/items/item[" + i + "]/id"); 125 | item.setID((String)expr.evaluate(doc, XPathConstants.STRING)); 126 | expr = xpath.compile("/resource/items/item[" + i + "]/parentID"); 127 | item.setParentID((String)expr.evaluate(doc, XPathConstants.STRING)); 128 | expr = xpath.compile("/resource/items/item[" + i + "]/name"); 129 | item.setName((String)expr.evaluate(doc, XPathConstants.STRING)); 130 | expr = xpath.compile("/resource/items/item[" + i + "]/ownedBy/displayName"); 131 | item.setOwnedBy((String)expr.evaluate(doc, XPathConstants.STRING)); 132 | expr = xpath.compile("/resource/items/item[" + i + "]/createdBy/displayName"); 133 | item.setCreatedBy((String)expr.evaluate(doc, XPathConstants.STRING)); 134 | expr = xpath.compile("/resource/items/item[" + i + "]/modifiedBy/displayName"); 135 | item.setModifiedBy((String)expr.evaluate(doc, XPathConstants.STRING)); 136 | expr = xpath.compile("/resource/items/item[" + i + "]/createdTime"); 137 | item.setCreatedTime((String)expr.evaluate(doc, XPathConstants.STRING)); 138 | expr = xpath.compile("/resource/items/item[" + i + "]/modifiedTime"); 139 | item.setModifiedTime((String)expr.evaluate(doc, XPathConstants.STRING)); 140 | expr = xpath.compile("/resource/items/item[" + i + "]/size"); 141 | item.setSize((Double)expr.evaluate(doc, XPathConstants.NUMBER)); 142 | expr = xpath.compile("/resource/items/item[" + i + "]/childItemsCount"); 143 | item.setChildItemsCount((item.getItemType() == Type.FOLDER) ? (Double)expr.evaluate(doc, XPathConstants.NUMBER) : 0); 144 | items.add(item); 145 | } 146 | } catch(Exception e) { 147 | System.out.println(e.toString()); 148 | } 149 | } 150 | 151 | return items; 152 | } 153 | 154 | public static void main(String[] args) { 155 | ItemsDC it = new ItemsDC(); 156 | it.listItemsInBaseFolder(); 157 | } 158 | } 159 | -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/Model/src/model/Type.java: -------------------------------------------------------------------------------- 1 | /*############################################################################## 2 | # Created By: Justin Paul 3 | # Source: https://blogs.oracle.com/OracleWebCenterSuite 4 | # 5 | # NOTE: Please note that these code snippets should be used for development and 6 | # testing purposes only, as such it is unsupported and should not be used 7 | # on production environments. 8 | ##############################################################################*/ 9 | package model; 10 | 11 | public enum Type { 12 | FOLDER, 13 | FILE 14 | } 15 | -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/OracleDocumentsCloudDataControlPart1.jws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/ViewController/ViewController.jpr: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/ViewController/adfmsrc/META-INF/adfm.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/ViewController/adfmsrc/view/DataBindings.cpx: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/ViewController/adfmsrc/view/pageDefs/index1PageDef.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/ViewController/classes/META-INF/adf-settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/ViewController/classes/META-INF/adfm.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/ViewController/classes/view/DataBindings.cpx: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/ViewController/classes/view/pageDefs/index1PageDef.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/ViewController/public_html/WEB-INF/adfc-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/ViewController/public_html/WEB-INF/faces-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | oracle.adf.rich 5 | 6 | -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/ViewController/public_html/WEB-INF/trinidad-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | skyros 4 | v1 5 | -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/ViewController/public_html/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | Faces Servlet 7 | javax.faces.webapp.FacesServlet 8 | 1 9 | 10 | 11 | resources 12 | org.apache.myfaces.trinidad.webapp.ResourceServlet 13 | 14 | 15 | BIGRAPHSERVLET 16 | oracle.adf.view.faces.bi.webapp.GraphServlet 17 | 18 | 19 | BIGAUGESERVLET 20 | oracle.adf.view.faces.bi.webapp.GaugeServlet 21 | 22 | 23 | MapProxyServlet 24 | oracle.adf.view.faces.bi.webapp.MapProxyServlet 25 | 26 | 27 | Faces Servlet 28 | /faces/* 29 | 30 | 31 | resources 32 | /adf/* 33 | 34 | 35 | resources 36 | /afr/* 37 | 38 | 39 | BIGRAPHSERVLET 40 | /servlet/GraphServlet/* 41 | 42 | 43 | BIGAUGESERVLET 44 | /servlet/GaugeServlet/* 45 | 46 | 47 | MapProxyServlet 48 | /mapproxy/* 49 | 50 | 51 | resources 52 | /bi/* 53 | 54 | 55 | trinidad 56 | org.apache.myfaces.trinidad.webapp.TrinidadFilter 57 | 58 | 59 | adfBindings 60 | oracle.adf.model.servlet.ADFBindingFilter 61 | 62 | 63 | trinidad 64 | Faces Servlet 65 | FORWARD 66 | REQUEST 67 | ERROR 68 | 69 | 70 | adfBindings 71 | Faces Servlet 72 | FORWARD 73 | REQUEST 74 | 75 | 76 | javax.faces.STATE_SAVING_METHOD 77 | client 78 | 79 | 80 | javax.faces.PARTIAL_STATE_SAVING 81 | false 82 | 83 | 84 | If this parameter is true, there will be an automatic check of the modification date of your JSPs, and saved state will be discarded when JSP's change. It will also automatically check if your skinning css files have changed without you having to restart the server. This makes development easier, but adds overhead. For this reason this parameter should be set to false when your application is deployed. 85 | org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION 86 | false 87 | 88 | 89 | Whether the 'Generated by...' comment at the bottom of ADF Faces HTML pages should contain version number information. 90 | oracle.adf.view.rich.versionString.HIDDEN 91 | true 92 | 93 | 94 | Security precaution to prevent clickjacking: bust frames if the ancestor window domain(protocol, host, and port) and the frame domain are different. Another options for this parameter are always and never. 95 | org.apache.myfaces.trinidad.security.FRAME_BUSTING 96 | differentOrigin 97 | 98 | 99 | javax.faces.VALIDATE_EMPTY_FIELDS 100 | true 101 | 102 | 103 | oracle.adf.view.rich.geometry.DEFAULT_DIMENSIONS 104 | auto 105 | 106 | 107 | oracle.adf.view.rich.SYNCROWS 108 | enable 109 | 110 | 111 | javax.faces.FACELETS_SKIP_COMMENTS 112 | true 113 | 114 | 115 | javax.faces.FACELETS_DECORATORS 116 | oracle.adfinternal.view.faces.facelets.rich.AdfTagDecorator 117 | 118 | 119 | javax.faces.FACELETS_RESOURCE_RESOLVER 120 | oracle.adfinternal.view.faces.facelets.rich.AdfFaceletsResourceResolver 121 | 122 | 123 | swf 124 | application/x-shockwave-flash 125 | 126 | 127 | amf 128 | application/x-amf 129 | 130 | 131 | oracle.adf.mbean.share.config.ADFConfigLifeCycleCallBack 132 | 133 | 134 | -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/ViewController/public_html/index1.jspx: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 18 | 19 | 20 | 24 | 25 | 27 | 28 | 29 | 31 | 32 | 33 | 35 | 36 | 37 | 39 | 42 | 43 | 44 | 45 | 46 | 48 | 49 | 50 | 52 | 53 | 54 | 56 | 57 | 58 | 60 | 61 | 62 | 64 | 65 | 66 | 68 | 70 | 71 | 72 | 73 | 75 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/ViewController/src/META-INF/adf-settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /OracleDocumentsCloudDataControlPart1/src/META-INF/weblogic-application.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | oracle.adf.share.weblogic.listeners.ADFApplicationStateListener 7 | 8 | 9 | oracle.mds.lcm.weblogic.WLLifecycleListener 10 | 11 | 12 | adf.oracle.domain 13 | 14 | 15 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Code snippets from examples in my blog @ https://blogs.oracle.com/OracleWebCenterSuite 2 | -------------------------------------------------------------------------------- /RIDCJavaStoredProcedures/CheckinFileIntoContentServer.java: -------------------------------------------------------------------------------- 1 | /*############################################################################## 2 | # Created By: Justin Paul 3 | # Source: https://blogs.oracle.com/OracleWebCenterSuite 4 | # 5 | # NOTE: Please note that these code snippets should be used for development and 6 | # testing purposes only, as such it is unsupported and should not be used 7 | # on production environments. 8 | ##############################################################################*/ 9 | 10 | package com.oracle.justin.wcc; 11 | 12 | import oracle.stellent.ridc.IdcClientManager; 13 | import oracle.stellent.ridc.IdcClient; 14 | import oracle.stellent.ridc.IdcContext; 15 | import oracle.stellent.ridc.model.TransferFile; 16 | import oracle.stellent.ridc.IdcClientConfig; 17 | import oracle.stellent.ridc.protocol.Protocol; 18 | import oracle.stellent.ridc.protocol.Connection; 19 | import oracle.stellent.ridc.model.DataBinder; 20 | import oracle.stellent.ridc.protocol.ServiceResponse; 21 | import oracle.stellent.ridc.IdcClientException; 22 | import oracle.sql.BLOB; 23 | 24 | import java.io.ByteArrayInputStream; 25 | import java.io.File; 26 | 27 | public class CheckinFileIntoContentServer { 28 | private static IdcClientManager manager; 29 | private static IdcClient client; 30 | 31 | public static void main(String[] args) { 32 | checkinFile("/Users/JustinPaul/Downloads/activation.jar"); 33 | } 34 | 35 | // This method will take the file path and checkin the file 36 | public static String checkinFile(String fPath) { 37 | String dDocName = ""; 38 | try { 39 | manager = new IdcClientManager(); 40 | client = (IdcClient) manager.createClient("idc://10.0.0.5:4444"); 41 | 42 | IdcContext userContext = new IdcContext("sysadmin"); 43 | DataBinder binder = client.createBinder(); 44 | binder.putLocal("IdcService", "CHECKIN_NEW"); 45 | binder.putLocal("dDocTitle", "Test File - ABC000001"); 46 | binder.putLocal("dDocType", "Document"); 47 | binder.putLocal("dSecurityGroup", "Public"); 48 | binder.putLocal("dDocAccount", ""); 49 | binder.addFile("primaryFile", new TransferFile(new File(fPath))); 50 | ServiceResponse response = client.sendRequest(userContext, binder); 51 | DataBinder responsebinder = response.getResponseAsBinder(); 52 | dDocName = responsebinder.getLocal("dDocName"); 53 | client = null; 54 | manager = null; 55 | } catch (Exception e) { 56 | // Nothing to do 57 | dDocName = e.getLocalizedMessage(); 58 | } 59 | 60 | return dDocName; 61 | } 62 | 63 | // This method will take a BLOB field and checkin 64 | public static String checkinBlob(BLOB bFile, String filename) { 65 | String dDocName = ""; 66 | try { 67 | manager = new IdcClientManager(); 68 | client = (IdcClient) manager.createClient("idc://10.0.0.5:4444"); 69 | 70 | // Read the BLOB and create a Input Stream 71 | // Make sure that the files are small as we are using in memory 72 | byte[] filearray = bFile.getBytes(1, (int) bFile.length()); 73 | ByteArrayInputStream stream = new ByteArrayInputStream(filearray); 74 | 75 | IdcContext userContext = new IdcContext("sysadmin"); 76 | DataBinder binder = client.createBinder(); 77 | binder.putLocal("IdcService", "CHECKIN_NEW"); 78 | binder.putLocal("dDocTitle", "Test File - ABC000002"); 79 | binder.putLocal("dDocType", "Document"); 80 | binder.putLocal("dSecurityGroup", "Public"); 81 | binder.putLocal("dDocAccount", ""); 82 | binder.addFile("primaryFile", new TransferFile(stream, filename, bFile.length())); 83 | ServiceResponse response = client.sendRequest(userContext, binder); 84 | DataBinder responsebinder = response.getResponseAsBinder(); 85 | dDocName = responsebinder.getLocal("dDocName"); 86 | client = null; 87 | manager = null; 88 | } catch (Exception e) { 89 | // Nothing to do 90 | dDocName = e.getLocalizedMessage(); 91 | } 92 | 93 | return dDocName; 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /RIDCJavaStoredProcedures/sql-do-checkin-test.sql: -------------------------------------------------------------------------------- 1 | CREATE OR REPLACE DIRECTORY TEMP_DIR AS '/tmp/'; 2 | DECLARE 3 | vblob BLOB; 4 | filename VARCHAR2(200); 5 | lbloblen INTEGER; 6 | lfile UTL_FILE.FILE_TYPE; 7 | lbuffer RAW(32767); 8 | lamount BINARY_INTEGER := 32767; 9 | lpos INTEGER := 1; 10 | BEGIN 11 | -- Save the file to a temporary location 12 | -- and checkin the file 13 | SELECT filename, 14 | filedata 15 | INTO filename, 16 | vblob 17 | FROM blob_table 18 | WHERE fileid = 1; 19 | 20 | lbloblen := DBMS_LOB.getlength(vblob); 21 | lfile := UTL_FILE.FOPEN('TEMP_DIR', 'file1.txt', 'w', 32767); 22 | WHILE lpos < lbloblen LOOP 23 | DBMS_LOB.READ(vblob, lamount, lpos, lbuffer); 24 | UTL_FILE.PUT_RAW(lfile, lbuffer, TRUE); 25 | lpos := lpos + lamount; 26 | END LOOP; 27 | UTL_FILE.FCLOSE(lfile); 28 | DBMS_OUTPUT.PUT_LINE ('dDocname: ' || CHECKINFILE('/tmp/' || filename)); 29 | 30 | -- IN MEMORY file checkin 31 | SELECT filename, 32 | filedata 33 | INTO filename, 34 | vblob 35 | FROM blob_table 36 | WHERE fileid = 2; 37 | DBMS_OUTPUT.PUT_LINE ('dDocname: ' || CHECKINBLOB(vblob, filename)); 38 | EXCEPTION 39 | WHEN OTHERS THEN 40 | IF UTL_FILE.IS_OPEN(lfile) THEN 41 | UTL_FILE.FCLOSE(lfile); 42 | END IF; 43 | END; 44 | -------------------------------------------------------------------------------- /RIDCJavaStoredProcedures/sql-test-user.sql: -------------------------------------------------------------------------------- 1 | CREATE 2 | OR 3 | REPLACE 4 | FUNCTION test.checkinFile(fPath IN VARCHAR2) 5 | RETURN VARCHAR2 6 | AS LANGUAGE JAVA 7 | NAME 'com.oracle.justin.wcc.CheckinFileIntoContentServer.checkinFile(java.lang.String) return java.lang.String'; 8 | 9 | CREATE 10 | OR 11 | REPLACE 12 | FUNCTION test.checkinBlob(bFile IN BLOB, filename IN VARCHAR2) 13 | RETURN VARCHAR2 14 | AS LANGUAGE JAVA 15 | NAME 'com.oracle.justin.wcc.CheckinFileIntoContentServer.checkinBlob(oracle.sql.BLOB, java.lang.String) return java.lang.String'; 16 | 17 | CREATE TABLE TEST.blob_table ( 18 | fileid INTEGER NOT NULL, 19 | filename VARCHAR2(255) NOT NULL, 20 | filedata BLOB 21 | ); 22 | 23 | / 24 | -------------------------------------------------------------------------------- /RIDCJythonScripts/JythonWCCAllExampleScripts.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freneticdisc/oracle-blog-examples/8889facfa95406c963e6241e427751509fc49b32/RIDCJythonScripts/JythonWCCAllExampleScripts.zip -------------------------------------------------------------------------------- /RIDCJythonScripts/copyfolderitems.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Created By: Justin Paul 3 | # Source: https://blogs.oracle.com/OracleWebCenterSuite 4 | # 5 | # NOTE: Please note that these code snippets should be used for development and 6 | # testing purposes only, as such it is unsupported and should not be used 7 | # on production environments. 8 | ################################################################################ 9 | 10 | from oracle.stellent.ridc import IdcClientManager 11 | from oracle.stellent.ridc import IdcContext 12 | 13 | manager = IdcClientManager () 14 | client = manager.createClient ("idc://127.0.0.1:4444") 15 | userContext = IdcContext ("weblogic") 16 | # client = manager.createClient ("http://127.0.0.1:16200/cs/idcplg") 17 | # userContext = IdcContext ("", "") 18 | 19 | binder = client.createBinder () 20 | binder.putLocal("IdcService", "FLD_COPY") 21 | 22 | # 1 to overwrite, 0 to leave 23 | binder.putLocal("overwrite", "1") 24 | 25 | # Set to 1 to copy all files of type owner to a new owner file 26 | # This action causes a new checkin to occur for each owner file being copied 27 | # By default, the copy of an owner file is a "soft" file that points to the source document 28 | binder.putLocal("copyOwnerFilesToNewFiles", "0") 29 | 30 | # Set to 1 to create new content items for all soft files being copied 31 | # By default, a copy of a soft file is another soft file pointing to the same content item 32 | binder.putLocal("copySoftFilesToNewFiles", "1") 33 | 34 | # Use any one of the identified for destination folder 35 | binder.putLocal("destination", "fFolderGUID:D638FE6CBE83C59B488AF5DDC70AD77F") 36 | # binder.putLocal("destination", "path:/Enterprise Libraries/My Library/Folder1/Destination") 37 | 38 | # You can move multiple items as item1, item2, item3, ..., item[n] 39 | # Item1 - Folder 40 | binder.putLocal("item1", "fFolderGUID:9386AC92919EF4A8C022D3EA47E63B52") 41 | # binder.putLocal("item1", "path:/Enterprise Libraries/My Library/Folder2") 42 | 43 | # Item2 - Folder 44 | # binder.putLocal("item2", "fFolderGUID:9386AC92919EF4A8C022D3EA47E63B76") 45 | binder.putLocal("item2", "path:/Enterprise Libraries/My Library/Folder3") 46 | 47 | # Item3 - File 48 | binder.putLocal("item3", "fFileGUID:F868B260B75DED9CD7A37F0A1CD703BD") 49 | # binder.putLocal("item3", "path:/Enterprise Libraries/My Library/Folder4/file1.txt") 50 | 51 | # Item4 - File 52 | # binder.putLocal("item4", "fFileGUID:8F9E18BB9D8609A0E07F391C8A3737F4") 53 | binder.putLocal("item4", "path:/Enterprise Libraries/My Library/Folder4/file2.txt") 54 | 55 | # get the response 56 | response = client.sendRequest (userContext, binder) 57 | responseBinder = response.getResponseAsBinder () 58 | -------------------------------------------------------------------------------- /RIDCJythonScripts/createanewfolder.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Created By: Justin Paul 3 | # Source: https://blogs.oracle.com/OracleWebCenterSuite 4 | # 5 | # NOTE: Please note that these code snippets should be used for development and 6 | # testing purposes only, as such it is unsupported and should not be used 7 | # on production environments. 8 | ################################################################################ 9 | 10 | from oracle.stellent.ridc import IdcClientManager 11 | from oracle.stellent.ridc import IdcContext 12 | 13 | manager = IdcClientManager () 14 | client = manager.createClient ("idc://127.0.0.1:4444") 15 | userContext = IdcContext ("weblogic") 16 | # client = manager.createClient ("http://127.0.0.1:16200/cs/idcplg") 17 | # userContext = IdcContext ("", "") 18 | 19 | binder = client.createBinder () 20 | binder.putLocal("IdcService", "FLD_CREATE_FOLDER") 21 | binder.putLocal("fParentGUID", "3A26D8CE011B9C8BE6B9CB1F32BD52FD") # This is the GUID of the parent folder 22 | binder.putLocal("fFolderName", "Folder1") 23 | binder.putLocal("fFolderType", "owner") 24 | binder.putLocal("fApplication", "framework") 25 | binder.putLocal("fInhibitPropagation", "0") 26 | binder.putLocal("fPromptForMetadata", "1") 27 | binder.putLocal("fSecurityGroup", "Public") 28 | binder.putLocal("fDocAccount", "") 29 | 30 | # List the default metadata for this folder here 31 | binder.putLocal("xComments", "This is a new folder") 32 | 33 | # get the response 34 | response = client.sendRequest (userContext, binder) 35 | responseBinder = response.getResponseAsBinder () 36 | localData = responseBinder.getLocalData () 37 | fFolderGUID = localData.get ("fFolderGUID") 38 | print fFolderGUID 39 | -------------------------------------------------------------------------------- /RIDCJythonScripts/createshortcuts.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Created By: Justin Paul 3 | # Source: https://blogs.oracle.com/OracleWebCenterSuite 4 | # 5 | # NOTE: Please note that these code snippets should be used for development and 6 | # testing purposes only, as such it is unsupported and should not be used 7 | # on production environments. 8 | ################################################################################ 9 | 10 | from oracle.stellent.ridc import IdcClientManager 11 | from oracle.stellent.ridc import IdcContext 12 | 13 | manager = IdcClientManager () 14 | client = manager.createClient ("idc://127.0.0.1:4444") 15 | userContext = IdcContext ("weblogic") 16 | # client = manager.createClient ("http://127.0.0.1:16200/cs/idcplg") 17 | # userContext = IdcContext ("", "") 18 | 19 | # Create shortcut for a folder 20 | # The user must have logged in at least once to have the profile folder created 21 | username="weblogic" 22 | binder = client.createBinder () 23 | binder.putLocal("IdcService", "FLD_CREATE_FOLDER") 24 | binder.putLocal("fParentGUID", "5517F2B282C5KJB40E5574E4D5AU7Y9A") # This is the GUID of the parent folder 25 | binder.putLocal("fTargetGUID", "5517F2B282C574B40E5574E4D5AF1C9A") # This is the GUID of original folder 26 | binder.putLocal("fFolderName", "My Shortcut to Folder1") 27 | binder.putLocal("fFolderType", "soft") 28 | userContext = IdcContext (username) 29 | 30 | # get the response 31 | response = client.sendRequest (userContext, binder) 32 | responseBinder = response.getResponseAsBinder () 33 | 34 | # Create shortcut for a file 35 | # The user must have logged in at least once to have the profile folder created 36 | username="weblogic" 37 | binder = client.createBinder () 38 | binder.putLocal("IdcService", "FLD_CREATE_FILE") 39 | binder.putLocal("fParentGUID", "5517F2B282C5KJB40E5574E4D5AU7Y9A") # This is the GUID of the parent folder 40 | binder.putLocal("fFileName", "My Shortcut to dDocName - 000421") 41 | binder.putLocal("dDocName", "000421") 42 | binder.putLocal("fFileType", "soft") 43 | userContext = IdcContext (username) 44 | 45 | # get the response 46 | response = client.sendRequest (userContext, binder) 47 | responseBinder = response.getResponseAsBinder () 48 | -------------------------------------------------------------------------------- /RIDCJythonScripts/deletecontent.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Created By: Justin Paul 3 | # Source: https://blogs.oracle.com/OracleWebCenterSuite 4 | # 5 | # NOTE: Please note that these code snippets should be used for development and 6 | # testing purposes only, as such it is unsupported and should not be used 7 | # on production environments. 8 | ################################################################################ 9 | 10 | from oracle.stellent.ridc import IdcClientManager 11 | from oracle.stellent.ridc import IdcContext 12 | 13 | manager = IdcClientManager () 14 | client = manager.createClient ("idc://127.0.0.1:4444") 15 | userContext = IdcContext ("weblogic") 16 | # client = manager.createClient ("http://127.0.0.1:16200/cs/idcplg") 17 | # userContext = IdcContext ("", "") 18 | 19 | # Delete all revisions 20 | binder = client.createBinder () 21 | binder.putLocal("IdcService", "DELETE_DOC") 22 | 23 | binder.putLocal("dID", "463") 24 | binder.putLocal("dDocName", "ABC000001") 25 | 26 | # get the response 27 | response = client.sendRequest (userContext, binder) 28 | responseBinder = response.getResponseAsBinder () 29 | 30 | # Delete a single revision 31 | binder = client.createBinder () 32 | binder.putLocal("IdcService", "DELETE_REV") 33 | 34 | binder.putLocal("dID", "422") 35 | binder.putLocal("dDocName", "000421") 36 | 37 | # get the response 38 | response = client.sendRequest (userContext, binder) 39 | responseBinder = response.getResponseAsBinder () 40 | -------------------------------------------------------------------------------- /RIDCJythonScripts/deletefolderitems.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Created By: Justin Paul 3 | # Source: https://blogs.oracle.com/OracleWebCenterSuite 4 | # 5 | # NOTE: Please note that these code snippets should be used for development and 6 | # testing purposes only, as such it is unsupported and should not be used 7 | # on production environments. 8 | ################################################################################ 9 | 10 | from oracle.stellent.ridc import IdcClientManager 11 | from oracle.stellent.ridc import IdcContext 12 | 13 | manager = IdcClientManager () 14 | client = manager.createClient ("idc://127.0.0.1:4444") 15 | userContext = IdcContext ("weblogic") 16 | # client = manager.createClient ("http://127.0.0.1:16200/cs/idcplg") 17 | # userContext = IdcContext ("", "") 18 | 19 | binder = client.createBinder () 20 | binder.putLocal("IdcService", "FLD_DELETE") 21 | 22 | # You can move multiple items as item1, item2, item3, ..., item[n] 23 | # Files are marked expired (moved to trash) and folders are deleted 24 | 25 | # Item1 - Folder 26 | binder.putLocal("item1", "fFolderGUID:69A93E7E99FA46CC35CBCEA0E1B9F8DB") 27 | # binder.putLocal("item1", "path:/Enterprise Libraries/My Library/Folder2") 28 | 29 | # Item2 - Folder 30 | # binder.putLocal("item2", "fFolderGUID:9386AC92919EF4A8C022D3EA47E63B52") 31 | binder.putLocal("item2", "path:/Enterprise Libraries/My Library/Folder3") 32 | 33 | # Item3 - File 34 | binder.putLocal("item3", "fFileGUID:8F9E18BB9D8609A0E07F391C8A3737F4") 35 | # binder.putLocal("item3", "path:/Enterprise Libraries/My Library/Folder4/file1.txt") 36 | 37 | # Item4 - File 38 | # binder.putLocal("item4", "fFileGUID:8F9E18BB9D8609A0E07F391C8A3737F4") 39 | binder.putLocal("item4", "path:/Enterprise Libraries/My Library/Folder4/file2.txt") 40 | 41 | # get the response 42 | response = client.sendRequest (userContext, binder) 43 | responseBinder = response.getResponseAsBinder () 44 | -------------------------------------------------------------------------------- /RIDCJythonScripts/listfolderitems.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Created By: Justin Paul 3 | # Source: https://blogs.oracle.com/OracleWebCenterSuite 4 | # 5 | # NOTE: Please note that these code snippets should be used for development and 6 | # testing purposes only, as such it is unsupported and should not be used 7 | # on production environments. 8 | ################################################################################ 9 | 10 | from oracle.stellent.ridc import IdcClientManager 11 | from oracle.stellent.ridc import IdcContext 12 | 13 | manager = IdcClientManager () 14 | client = manager.createClient ("idc://127.0.0.1:4444") 15 | userContext = IdcContext ("weblogic") 16 | # client = manager.createClient ("http://127.0.0.1:16200/cs/idcplg") 17 | # userContext = IdcContext ("", "") 18 | 19 | binder = client.createBinder () 20 | binder.putLocal("IdcService", "FLD_BROWSE") 21 | 22 | # Specify one of the following 23 | # binder.putLocal("item", "[path:|fFolderGUID:]") 24 | # binder.putLocal("items", "[path:|fFolderGUID:], ...") 25 | # binder.putLocal("path", "") 26 | binder.putLocal("fFolderGUID", "AF9D359824F9B32515C166EEF2D9A5FE") 27 | 28 | # Specifies the Folders Application of the location to which the user is browsing 29 | # binder.putLocal("fldapp", "framework") 30 | 31 | # Performs the service in a combined pagination mode, default is 0 32 | binder.putLocal("doCombinedBrowse", "1") 33 | 34 | # Lists folders before files in the combined pagination mode, default is 1 35 | binder.putLocal("foldersFirst", "1") 36 | 37 | # The number of folders to return, default is 50 38 | binder.putLocal("folderCount", "50") 39 | 40 | # The row number at which to start returning data and is used for pagination, default is 0 41 | binder.putLocal("folderStartRow", "0") 42 | 43 | # The number of files to return, default is 50 44 | binder.putLocal("fileCount", "50") 45 | 46 | # The row number at which to start returning data and is used for pagination, default is 0 47 | binder.putLocal("fileStartRow", "0") 48 | 49 | # The number of items (folders plus files) to return, default is 100 50 | binder.putLocal("combinedCount", "100") 51 | 52 | # The row number at which to start returning data and is used for pagination, default is 0 53 | binder.putLocal("combinedStartRow", "0") 54 | 55 | # Returns target folder's information for all shortcuts retrieved in the ChildTargetFolders ResultSet, default is 0 56 | binder.putLocal("doRetrieveTargetInfo", "0") 57 | 58 | # Adds a fIsFavorite field in the ResultSet to indicate if the folder or file is favorite 59 | # (if it has a shortcut in the Favorites folder), default is 0 60 | binder.putLocal("doMarkFavorites", "0") 61 | 62 | # Adds a URL field in the files ResultSet that is the absolute Web location of the document, default is 0 63 | binder.putLocal("doRetrieveDocumentURL", "0") 64 | 65 | # Post processes the results to return only unique links, default is 0 66 | binder.putLocal("doRetrieveUniqueLinks", "0") 67 | 68 | # The comma-delinated list of filter parameters for the browse 69 | # For example, foldersFilterParams=fIsContribution&fIsContribution=1 will return folders with fIsContribution=1 70 | # binder.putLocal("foldersFilterParams", "") 71 | 72 | # Standard query for filtering out the folders 73 | # For example, foldersFilterQuery=fFolderName`test` 74 | # binder.putLocal("foldersFilterQuery", "") 75 | 76 | # Standard query for filtering out the files 77 | # For example, filesFilterQuery=fFileName`test` 78 | # binder.putLocal("filesFilterQuery", "") 79 | 80 | # Field name from the FolderFolders table on which to sort the records 81 | # binder.putLocal("foldersSortField", "") 82 | 83 | # Specify Asc or Desc for an ascending or descending sort 84 | # binder.putLocal("foldersSortOrder", "") 85 | 86 | # The comma-delinated list of filter parameters on the browse 87 | # For example, filesFilterParams=fOwner&fOwner=sysadmin will return folders with fOwner=sysadmin 88 | # binder.putLocal("filesFilterParams", "") 89 | 90 | # If set to Folders, this filters results to only include folders that are favorites 91 | # If set to Files, this filters only files that are favorites 92 | # If set to 1, this filters both folders and files that are favorites 93 | # By default, this filters none 94 | # binder.putLocal("filterFavorites", "1") 95 | 96 | # If set to Folders, this filters results to only include folders that are followed 97 | # If set to Files, this filters only files that are followed 98 | # If set to 1, this filters both folders and files that are followed 99 | # By default, it filters none 100 | # binder.putLocal("filterFollows", "1") 101 | 102 | # get the response 103 | response = client.sendRequest (userContext, binder) 104 | responseBinder = response.getResponseAsBinder () 105 | print responseBinder 106 | 107 | # Print Local data 108 | localData = responseBinder.getLocalData () 109 | for key in localData: 110 | print key + ": " + localData.get(key) 111 | 112 | # Get current folder information 113 | fInfo = responseBinder.getResultSet("FolderInfo") 114 | fFields = fInfo.getFields() 115 | fRows = fInfo.getRows() 116 | for fChild in fRows: 117 | for fField in fFields: 118 | print fField.getName() + ": " + fChild.get(fField.getName()) 119 | 120 | # Loop through the child folders 121 | fChildFolders = responseBinder.getResultSet("ChildFolders") 122 | fFields = fChildFolders.getFields() 123 | fRows = fChildFolders.getRows() 124 | for fChild in fRows: 125 | for fField in fFields: 126 | print fField.getName() + ": " + fChild.get(fField.getName()) 127 | 128 | # Loop through the child files 129 | fChildFiles = responseBinder.getResultSet("ChildFiles") 130 | fFields = fChildFiles.getFields() 131 | fRows = fChildFiles.getRows() 132 | for fChild in fRows: 133 | for fField in fFields: 134 | print fField.getName() + ": " + fChild.get(fField.getName()) 135 | -------------------------------------------------------------------------------- /RIDCJythonScripts/movefolderitems.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Created By: Justin Paul 3 | # Source: https://blogs.oracle.com/OracleWebCenterSuite 4 | # 5 | # NOTE: Please note that these code snippets should be used for development and 6 | # testing purposes only, as such it is unsupported and should not be used 7 | # on production environments. 8 | ################################################################################ 9 | 10 | from oracle.stellent.ridc import IdcClientManager 11 | from oracle.stellent.ridc import IdcContext 12 | 13 | manager = IdcClientManager () 14 | client = manager.createClient ("idc://127.0.0.1:4444") 15 | userContext = IdcContext ("weblogic") 16 | # client = manager.createClient ("http://127.0.0.1:16200/cs/idcplg") 17 | # userContext = IdcContext ("", "") 18 | 19 | binder = client.createBinder () 20 | binder.putLocal("IdcService", "FLD_MOVE") 21 | 22 | # 1 to overwrite, 0 to leave 23 | binder.putLocal("overwrite", "1") 24 | 25 | # Use any one of the identified for destination folder 26 | binder.putLocal("destination", "fFolderGUID:D638FE6CBE83C59B488AF5DDC70AD77F") 27 | # binder.putLocal("destination", "path:/Enterprise Libraries/My Library/Folder1/Destination") 28 | 29 | # You can move multiple items as item1, item2, item3, ..., item[n] 30 | # Item1 - Folder 31 | binder.putLocal("item1", "fFolderGUID:9386AC92919EF4A8C022D3EA47E63B52") 32 | # binder.putLocal("item1", "path:/Enterprise Libraries/My Library/Folder2") 33 | 34 | # Item2 - Folder 35 | # binder.putLocal("item2", "fFolderGUID:9386AC92919EF4A8C022D3EA47E63B76") 36 | binder.putLocal("item2", "path:/Enterprise Libraries/My Library/Folder3") 37 | 38 | # Item3 - File 39 | binder.putLocal("item3", "fFileGUID:F868B260B75DED9CD7A37F0A1CD703BD") 40 | # binder.putLocal("item3", "path:/Enterprise Libraries/My Library/Folder4/file1.txt") 41 | 42 | # Item4 - File 43 | # binder.putLocal("item4", "fFileGUID:8F9E18BB9D8609A0E07F391C8A3737F4") 44 | binder.putLocal("item4", "path:/Enterprise Libraries/My Library/Folder4/file2.txt") 45 | 46 | # get the response 47 | response = client.sendRequest (userContext, binder) 48 | responseBinder = response.getResponseAsBinder () 49 | -------------------------------------------------------------------------------- /RIDCJythonScripts/propagatemetadata.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Created By: Justin Paul 3 | # Source: https://blogs.oracle.com/OracleWebCenterSuite 4 | # 5 | # NOTE: Please note that these code snippets should be used for development and 6 | # testing purposes only, as such it is unsupported and should not be used 7 | # on production environments. 8 | ################################################################################ 9 | 10 | from oracle.stellent.ridc import IdcClientManager 11 | from oracle.stellent.ridc import IdcContext 12 | 13 | manager = IdcClientManager () 14 | client = manager.createClient ("idc://127.0.0.1:4444") 15 | userContext = IdcContext ("weblogic") 16 | # client = manager.createClient ("http://127.0.0.1:16200/cs/idcplg") 17 | # userContext = IdcContext ("", "") 18 | 19 | binder = client.createBinder () 20 | binder.putLocal("IdcService", "FLD_PROPAGATE") 21 | 22 | # Set to 1 to propagate metadata to documents pointed to by soft links 23 | binder.putLocal("propagateThroughSoftLinks", "1") 24 | 25 | binder.putLocal("fFolderGUID", "D7B0D24CEE5C70CB3B8AD13809DD2505") 26 | 27 | # You can propagate multiple metadata, just repeat the 2 lines below 28 | # Set to 1 to propagate the specified field 29 | binder.putLocal("dSecurityGroup:isSelected", "1") 30 | binder.putLocal("dSecurityGroup", "Public") 31 | 32 | binder.putLocal("dDocAccount:isSelected", "1") 33 | binder.putLocal("dDocAccount", "abc") 34 | 35 | # get the response 36 | response = client.sendRequest (userContext, binder) 37 | responseBinder = response.getResponseAsBinder () 38 | -------------------------------------------------------------------------------- /RIDCJythonScripts/unfilefolderitems.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Created By: Justin Paul 3 | # Source: https://blogs.oracle.com/OracleWebCenterSuite 4 | # 5 | # NOTE: Please note that these code snippets should be used for development and 6 | # testing purposes only, as such it is unsupported and should not be used 7 | # on production environments. 8 | ################################################################################ 9 | 10 | from oracle.stellent.ridc import IdcClientManager 11 | from oracle.stellent.ridc import IdcContext 12 | 13 | manager = IdcClientManager () 14 | client = manager.createClient ("idc://127.0.0.1:4444") 15 | userContext = IdcContext ("weblogic") 16 | # client = manager.createClient ("http://127.0.0.1:16200/cs/idcplg") 17 | # userContext = IdcContext ("", "") 18 | 19 | binder = client.createBinder () 20 | binder.putLocal("IdcService", "FLD_UNFILE") 21 | 22 | # Unfile one or more items from the Folders hierarchy 23 | # You can move multiple items as item1, item2, item3, ..., item[n] 24 | 25 | # Item1 - File 26 | binder.putLocal("item3", "fFileGUID:8F9E18BB9D8609A0E07F391C8A3737F4") 27 | # binder.putLocal("item3", "path:/Enterprise Libraries/My Library/Folder4/file1.txt") 28 | 29 | # Item2 - File 30 | # binder.putLocal("item4", "fFileGUID:8F9E18BB9D8609A0E07F391C8A3737F4") 31 | binder.putLocal("item4", "path:/Enterprise Libraries/My Library/Folder4/file2.txt") 32 | 33 | # get the response 34 | response = client.sendRequest (userContext, binder) 35 | responseBinder = response.getResponseAsBinder () 36 | -------------------------------------------------------------------------------- /RIDCJythonScripts/updatemetadata.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Created By: Justin Paul 3 | # Source: https://blogs.oracle.com/OracleWebCenterSuite 4 | # 5 | # NOTE: Please note that these code snippets should be used for development and 6 | # testing purposes only, as such it is unsupported and should not be used 7 | # on production environments. 8 | ################################################################################ 9 | 10 | from oracle.stellent.ridc import IdcClientManager 11 | from oracle.stellent.ridc import IdcContext 12 | 13 | manager = IdcClientManager () 14 | client = manager.createClient ("idc://127.0.0.1:4444") 15 | userContext = IdcContext ("weblogic") 16 | # client = manager.createClient ("http://127.0.0.1:16200/cs/idcplg") 17 | # userContext = IdcContext ("", "") 18 | 19 | # Delete all revisions 20 | binder = client.createBinder () 21 | binder.putLocal("IdcService", "UPDATE_DOCINFO") 22 | 23 | binder.putLocal("dID", "221") 24 | binder.putLocal("dDocName", "000220") 25 | binder.putLocal("dSecurityGroup", "Public") 26 | binder.putLocal("dDocAccount", "") 27 | binder.putLocal("SkipIndexingForUpdate", "false") 28 | 29 | # Custom Metadata here 30 | binder.putLocal("xComments", "This is an update") 31 | 32 | # get the response 33 | response = client.sendRequest (userContext, binder) 34 | responseBinder = response.getResponseAsBinder () 35 | -------------------------------------------------------------------------------- /RIDCJythonScripts/uploadfile.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Created By: Justin Paul 3 | # Source: https://blogs.oracle.com/OracleWebCenterSuite 4 | # 5 | # NOTE: Please note that these code snippets should be used for development and 6 | # testing purposes only, as such it is unsupported and should not be used 7 | # on production environments. 8 | ################################################################################ 9 | 10 | from oracle.stellent.ridc import IdcClientManager 11 | from oracle.stellent.ridc import IdcContext 12 | from oracle.stellent.ridc.model import TransferFile 13 | from java.io import File 14 | 15 | manager = IdcClientManager () 16 | client = manager.createClient ("idc://127.0.0.1:4444") 17 | userContext = IdcContext ("weblogic") 18 | # client = manager.createClient ("http://127.0.0.1:16200/cs/idcplg") 19 | # userContext = IdcContext ("", "") 20 | 21 | # Checkin a new file 22 | binder = client.createBinder () 23 | binder.putLocal("IdcService", "CHECKIN_NEW") 24 | 25 | # Comment the line below if you do not want to put the file in a folder 26 | # Meatadata defaults are copied from the folder except SecurityGroup and Account 27 | binder.putLocal("fParentGUID", "D638FE6CBE83C59B488AF5DDC70AD77F") 28 | 29 | binder.putLocal("dDocName", "ABC000001") 30 | binder.putLocal("dDocTitle", "Test File - ABC000001") 31 | binder.putLocal("dDocType", "Document") 32 | binder.putLocal("dSecurityGroup", "Public") 33 | binder.putLocal("dDocAccount", "") 34 | binder.addFile("primaryFile", TransferFile(File("abc.txt"))) 35 | 36 | # Custom Metadata here 37 | binder.putLocal("xComments", "This is new content - revision 1") 38 | 39 | # get the response 40 | response = client.sendRequest (userContext, binder) 41 | responseBinder = response.getResponseAsBinder () 42 | localData = responseBinder.getLocalData () 43 | dDocName = localData.get ("dDocName") 44 | dID = localData.get ("dID") 45 | 46 | # Checkin a new revision 47 | # Need to checkout first 48 | binder = client.createBinder () 49 | binder.putLocal("IdcService", "CHECKOUT") 50 | binder.putLocal("dID", dID) 51 | response = client.sendRequest (userContext, binder) 52 | responseBinder = response.getResponseAsBinder () 53 | 54 | binder = client.createBinder () 55 | binder.putLocal("IdcService", "CHECKIN_SEL") 56 | 57 | binder.putLocal("dID", dID) 58 | binder.putLocal("dDocName", dDocName) 59 | binder.putLocal("dDocTitle", "Test File 2 - ABC000001") 60 | binder.putLocal("dSecurityGroup", "Public") 61 | binder.putLocal("dDocAccount", "") 62 | binder.putLocal("doFileCopy", "1") 63 | binder.addFile("primaryFile", TransferFile(File("createnewfolderandsubfolders.py"))) 64 | 65 | # Custom Metadata here 66 | binder.putLocal("xComments", "This is a new revision - revision 2") 67 | 68 | # get the response 69 | response = client.sendRequest (userContext, binder) 70 | responseBinder = response.getResponseAsBinder () 71 | -------------------------------------------------------------------------------- /Rule-based Classification/create_db_objects.sql: -------------------------------------------------------------------------------- 1 | CREATE 2 | INDEX dev1_ocs.classcats_idx 3 | ON dev1_ocs.classificationcategories(categoryselectionrule) 4 | INDEXTYPE 5 | IS ctxsys.ctxrule; 6 | 7 | CREATE 8 | OR 9 | REPLACE 10 | FUNCTION dev1_ocs.categorizeDocument( 11 | ddocname IN VARCHAR2, 12 | activeindex IN VARCHAR2) 13 | RETURN VARCHAR2 14 | IS 15 | b_docfulltext BLOB; 16 | c_document CLOB; 17 | i_dest_offset INTEGER := 1; 18 | i_src_offset INTEGER := 1; 19 | i_lang_context INTEGER := dbms_lob.default_lang_ctx; 20 | i_warning INTEGER; 21 | v_categories VARCHAR2(200) := ''; 22 | v_query VARCHAR2(100) := 'SELECT '; 23 | BEGIN 24 | IF (INSTR(activeindex, 'IDCCOLL') = 1) 25 | THEN 26 | v_query := v_query || 'ddocfulltext'; 27 | ELSIF (INSTR(activeindex, 'IDCTEXT') = 1) 28 | THEN 29 | v_query := v_query || 'otscontent'; 30 | ELSE 31 | v_query := v_query || '''X'''; 32 | END IF; 33 | 34 | v_query := v_query || ' FROM ' || activeindex; 35 | v_query := v_query || ' WHERE ddocname = :1'; 36 | dbms_lob.createtemporary(c_document, true); 37 | EXECUTE 38 | IMMEDIATE v_query 39 | INTO b_docfulltext 40 | USING ddocname; 41 | dbms_lob.converttoclob(c_document, 42 | b_docfulltext, 43 | dbms_lob.lobmaxsize, 44 | i_dest_offset, 45 | i_src_offset, 46 | dbms_lob.default_csid, 47 | i_lang_context, 48 | i_warning); 49 | FOR cat IN (SELECT categoryid FROM classificationcategories WHERE MATCHES(categoryselectionrule, c_document) > 0) 50 | LOOP 51 | v_categories := v_categories || cat.categoryid || ', '; 52 | END LOOP; 53 | dbms_lob.freetemporary(c_document); 54 | v_categories := TRIM(TRAILING ' ' FROM v_categories); 55 | v_categories := TRIM(TRAILING ',' FROM v_categories); 56 | RETURN v_categories; 57 | EXCEPTION 58 | WHEN OTHERS 59 | THEN RETURN ''; 60 | END; 61 | 62 | / 63 | -------------------------------------------------------------------------------- /Rule-based Classification/generate_categories_example.sql: -------------------------------------------------------------------------------- 1 | DECLARE 2 | v_cats VARCHAR2(200) := ''; 3 | v_indx VARCHAR2(8) := 'IDCCOLL2'; 4 | CURSOR content_released_today 5 | IS 6 | SELECT did, 7 | ddocname 8 | FROM revisions 9 | WHERE TRUNC(dreleasedate) = TRUNC(SYSDATE); 10 | BEGIN 11 | FOR content IN content_released_today 12 | LOOP 13 | v_cats := dev1_ocs.categorizeDocument(content.ddocname, v_indx); 14 | IF NVL(v_cats, 'NULL') <> 'NULL' 15 | THEN 16 | UPDATE dev1_ocs.docmeta 17 | SET xclassificationcategory = v_cats 18 | WHERE did = content.did; 19 | UPDATE dev1_ocs.revisions 20 | SET dreleasestate = 'U' 21 | WHERE did = content.did; 22 | END IF; 23 | END LOOP; 24 | COMMIT; 25 | END; -------------------------------------------------------------------------------- /Rule-based Classification/rule-basedclassificationobjects_cmu.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freneticdisc/oracle-blog-examples/8889facfa95406c963e6241e427751509fc49b32/Rule-based Classification/rule-basedclassificationobjects_cmu.zip -------------------------------------------------------------------------------- /SampleComponent01/SampleComponent01.hda: -------------------------------------------------------------------------------- 1 |  2 | @Properties LocalData 3 | blFieldTypes= 4 | preventAdditionalComponentDowngrade=0 5 | hasPreferenceData=0 6 | blDateFormat=M/d{/yy}{ h:mm[:ss]{ a}}!mAM,PM!tAmerica/New_York 7 | ComponentName=SampleComponent01 8 | version=2012_02_15(build 1) 9 | @end 10 | @ResultSet ClassAliases 11 | 3 12 | classname 13 | location 14 | loadOrder 15 | @end 16 | @ResultSet Filters 17 | 4 18 | type 19 | location 20 | parameter 21 | loadOrder 22 | @end 23 | @ResultSet ResourceDefinition 24 | 4 25 | type 26 | filename 27 | tables 28 | loadOrder 29 | resource 30 | resources/samplecomponent01_resource1.htm 31 | null 32 | 10 33 | query 34 | resources/samplecomponent01_query.htm 35 | SampleComponent01_Queries 36 | 10 37 | service 38 | resources/samplecomponent01_service.htm 39 | SampleComponent01_Services 40 | 10 41 | template 42 | templates/samplecomponent01_template.hda 43 | null 44 | 10 45 | @end 46 | @ResultSet MergeRules 47 | 4 48 | fromTable 49 | toTable 50 | column 51 | loadOrder 52 | SampleComponent01_Templates 53 | IntradocTemplates 54 | name 55 | 10 56 | @end 57 | 58 | -------------------------------------------------------------------------------- /SampleComponent01/SampleComponent01.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freneticdisc/oracle-blog-examples/8889facfa95406c963e6241e427751509fc49b32/SampleComponent01/SampleComponent01.zip -------------------------------------------------------------------------------- /SampleComponent01/readme.txt: -------------------------------------------------------------------------------- 1 | SampleComponent01 Component -------------------------------------------------------------------------------- /SampleComponent01/resources/samplecomponent01_query.htm: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | SampleComponent01 query</head> 6 | <body> 7 | 8 | <@table SampleComponent01_Queries@> 9 | <table border=1><caption><strong>Query Definition Table</strong></caption> 10 | <tr> 11 | <td>name</td><td>queryStr</td><td>parameters</td> 12 | </tr> 13 | <tr> 14 | <td>SC01DocTypeList</td> 15 | <td>SELECT * FROM DocTypes ORDER BY dDocType</td> 16 | <td></td> 17 | </tr> 18 | </table> 19 | <@end@> 20 | </body> 21 | </html> 22 | -------------------------------------------------------------------------------- /SampleComponent01/resources/samplecomponent01_resource1.htm: -------------------------------------------------------------------------------- 1 | <html> 2 | <head> 3 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 4 | <title> 5 | SampleComponent01 htmlIncludeOrString</head> 6 | <body> 7 | 8 | <@dynamicdata CoreMenuItems@> 9 | id, label, linkType, linkData 10 | SC01_LINKS, Sample Component 01 Links, , 11 | SC01_TREE, Tree Parent, , 12 | SC01_TCH01, Content Types, cgi, IdcService=SC01_GET_DOCTYPES 13 | GOOGLE, Google, external, http://www.google.com 14 | APPLE, Apple, external, http://www.apple.com 15 | <@end@> 16 | 17 | <@dynamicdata CoreMenuItemRelationships@> 18 | <?commatable mergeKey="primaryKey"?> 19 | parentId, id, loadOrder 20 | MENU_B, SC01_LINKS, 1000 21 | SC01_LINKS, SC01_TREE, 10 22 | SC01_TREE, SC01_TCH01, 20 23 | SC01_TREE, GOOGLE, 30 24 | SC01_LINKS, APPLE, 40 25 | <@end@> 26 | 27 | <@dynamicdata CoreMenuItemsFlags@> 28 | id, flags 29 | SC01_LINKS, isLoggedIn 30 | SC01_TREE, isLoggedIn 31 | SC01_TCH01, isLoggedIn 32 | GOOGLE, isLoggedIn 33 | APPLE, isLoggedIn 34 | <@end@> 35 | 36 | <@dynamicdata CoreMenuItemsImages@> 37 | id, image, imageOpen 38 | SC01_TREE, WebFolder_closed.gif, WebFolder_open.gif 39 | SC01_TCH01, ScsPageItem.gif, 40 | GOOGLE, WebItem.gif, 41 | APPLE, WebItem.gif, 42 | <@end@> 43 | 44 | </body> 45 | </html> 46 | -------------------------------------------------------------------------------- /SampleComponent01/resources/samplecomponent01_service.htm: -------------------------------------------------------------------------------- 1 | <html> 2 | <head> 3 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 4 | <title> 5 | SampleComponent01 service</head> 6 | <body> 7 | 8 | <@table SampleComponent01_Services@> 9 | <table border=1><caption><strong>Scripts For Custom Services</strong></caption> 10 | <tr> 11 | <td>Name</td><td>Attributes</td><td>Actions</td> 12 | </tr> 13 | <tr> 14 | <td>SC01_GET_DOCTYPES</td> 15 | <td>DocService 16 | 51 17 | SC01_CONTENT_TYPES 18 | null 19 | null<br> 20 | null</td> 21 | <td>5:SC01DocTypeList:SC01DOCTYPES::Unable to fetch the Document Types</td> 22 | </tr> 23 | </table> 24 | <@end@> 25 | </body> 26 | </html> 27 | -------------------------------------------------------------------------------- /SampleComponent01/templates/SampleComponent01_content_types.htm: -------------------------------------------------------------------------------- 1 | <html> 2 | <head> 3 | <$defaultPageTitle="List of Content Types"$> 4 | <$include std_html_head_declarations$> 5 | </head> 6 | 7 | <$include body_def$> 8 | 9 | <$include std_page_begin$> 10 | 11 | <$include std_header$> 12 | 13 | <table> 14 | <tr> 15 | <td colspan=3 align=center> 16 | <h4>The Content Types Table</h4></td> 17 | </tr> 18 | <tr> 19 | <td><strong>Content Type</strong></td> 20 | <td><strong>Description</strong></td> 21 | <td><strong>Image</strong></td> 22 | </tr> 23 | <$loop SC01DOCTYPES$> 24 | <tr> 25 | <td><$dDocType$></td> 26 | <td><$dDescription$></td> 27 | <td><$dGif$></td> 28 | </tr> 29 | <$endloop$> 30 | </table> 31 | 32 | <$include std_page_end$> 33 | 34 | </body> 35 | </html> 36 | -------------------------------------------------------------------------------- /SampleComponent01/templates/samplecomponent01_template.hda: -------------------------------------------------------------------------------- 1 | <?hda version="11gR1-11.1.1.5.0-idcprod1-110413T184243" jcharset=UTF8 encoding=utf-8?> 2 | @Properties LocalData 3 | blFieldTypes= 4 | blDateFormat=M/d{/yy}{ h:mm[:ss]{ a}}!mAM,PM!tAmerica/New_York 5 | @end 6 | @ResultSet SampleComponent01_Templates 7 | 5 8 | name 9 | class 10 | formtype 11 | filename 12 | description 13 | SC01_CONTENT_TYPES 14 | Pages 15 | DocumentInfoPage 16 | SampleComponent01_content_types.htm 17 | List of Content Types 18 | @end 19 | 20 | -------------------------------------------------------------------------------- /WebCenterContentInEnterprise/WebCenterContentArch.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freneticdisc/oracle-blog-examples/8889facfa95406c963e6241e427751509fc49b32/WebCenterContentInEnterprise/WebCenterContentArch.jpg -------------------------------------------------------------------------------- /WebCenterContentInEnterprise/WebCenterContentArch.odg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freneticdisc/oracle-blog-examples/8889facfa95406c963e6241e427751509fc49b32/WebCenterContentInEnterprise/WebCenterContentArch.odg --------------------------------------------------------------------------------