4 Replies Latest reply on Jul 11, 2008 7:13 AM by dilipreddy

    Create a new Portal Object through the API?

      Is it possible to create a new portal object by using the API? I was looking through the documentation but didn't see anything.

      Thanks!

        • 1. Re: Create a new Portal Object through the API?
          dilipreddy

          Hi
          it is possible to create portal instance, and you have to mention inthe *-object.xml file
          for example see this file


          <?xml version="1.0" encoding="UTF-8"?>



          <if-exists>overwrite</if-exists>
          <parent-ref/>

          <portal-name>Flex</portal-name>


          <page-name>MyPage</page-name>

          <window-name>FlexcalljspWindow</window-name>
          <instance-ref>FlexcalljspInstance</instance-ref>
          left
          0






          <if-exists>overwrite</if-exists>
          <parent-ref>Flex</parent-ref>

          <page-name>default</page-name>

          <window-name>FlexcalljspWindow</window-name>
          <instance-ref>FlexcalljspInstance</instance-ref>
          left
          0









          see the above example file, you can access by using the url..

          http://localhost:8080/portal/portal/Flex


          try this

          • 2. Re: Create a new Portal Object through the API?
            dilipreddy

            <?xml version="1.0" encoding="UTF-8"?>



            <if-exists>overwrite</if-exists>
            <parent-ref/>

            <portal-name>Flex</portal-name>


            <page-name>MyPage</page-name>

            <window-name>FlexcalljspWindow</window-name>
            <instance-ref>FlexcalljspInstance</instance-ref>
            left
            0






            <if-exists>overwrite</if-exists>
            <parent-ref>Flex</parent-ref>

            <page-name>default</page-name>

            <window-name>FlexcalljspWindow</window-name>
            <instance-ref>FlexcalljspInstance</instance-ref>
            left
            0




            • 3. Re: Create a new Portal Object through the API?

              Hi,

              So I was actually hoping to use the API library to add a new Portal instance through my Portlet's interface (similar to how the Core-Admin portlet works, you enter a Portal Name in a text box and it creates a new Portal)

              Is that Possible?

              Thanks!

              • 4. Re: Create a new Portal Object through the API?
                dilipreddy

                Yah we can create new portal instance by specifying in *-object.xml