示例#1
0
	def __init__(self, pathToJSON, serverType):
		try:
			clientManager = IdcClientManager()
			idcConnectionURL = "idc://%s:4444" % CMUConfigParser(pathToJSON).returnObject(serverType, "hostname").split(":")[0]
			instanceName = CMUConfigParser(pathToJSON).returnObject(serverType, "instance")
			Username = CMUConfigParser(pathToJSON).returnObject(serverType, "username")
			Password = CMUConfigParser(pathToJSON).returnObject(serverType, "password")
		except Exception, err:
			self.SetupUCMConnectionLogger.infoMessage('__init__', 'Unable to read config file: %s' % err)
			System.exit(1)
################################################################################
# Created By: Justin Paul
# Source:     https://blogs.oracle.com/OracleWebCenterSuite
#
# NOTE: Please note that these code snippets should be used for development and
#       testing purposes only, as such it is unsupported and should not be used
#       on production environments.
################################################################################

from oracle.stellent.ridc import IdcClientManager
from oracle.stellent.ridc import IdcContext

manager = IdcClientManager ()
client = manager.createClient ("idc://127.0.0.1:4444")
userContext = IdcContext ("weblogic")
# client = manager.createClient ("http://127.0.0.1:16200/cs/idcplg")
# userContext = IdcContext ("<user>", "<password>")

binder = client.createBinder ()
binder.putLocal("IdcService", "FLD_CREATE_FOLDER")
binder.putLocal("fParentGUID", "3A26D8CE011B9C8BE6B9CB1F32BD52FD")  # This is the GUID of the parent folder
binder.putLocal("fFolderName", "Folder1")
binder.putLocal("fFolderType", "owner")
binder.putLocal("fApplication", "framework")
binder.putLocal("fInhibitPropagation", "0")
binder.putLocal("fPromptForMetadata", "1")
binder.putLocal("fSecurityGroup", "Public")
binder.putLocal("fDocAccount", "")

# List the default metadata for this folder here
binder.putLocal("xComments", "This is a new folder")
################################################################################
# Created By: Justin Paul
# Source:     https://blogs.oracle.com/OracleWebCenterSuite
#
# NOTE: Please note that these code snippets should be used for development and
#       testing purposes only, as such it is unsupported and should not be used
#       on production environments.
################################################################################

from oracle.stellent.ridc import IdcClientManager
from oracle.stellent.ridc import IdcContext

manager = IdcClientManager()
client = manager.createClient("idc://127.0.0.1:4444")
userContext = IdcContext("weblogic")
# client = manager.createClient ("http://127.0.0.1:16200/cs/idcplg")
# userContext = IdcContext ("<user>", "<password>")

binder = client.createBinder()
binder.putLocal("IdcService", "FLD_DELETE")

# You can move multiple items as item1, item2, item3, ..., item[n]
# Files are marked expired (moved to trash) and folders are deleted

# Item1 - Folder
binder.putLocal("item1", "fFolderGUID:69A93E7E99FA46CC35CBCEA0E1B9F8DB")
# binder.putLocal("item1", "path:/Enterprise Libraries/My Library/Folder2")

# Item2 - Folder
# binder.putLocal("item2", "fFolderGUID:9386AC92919EF4A8C022D3EA47E63B52")
binder.putLocal("item2", "path:/Enterprise Libraries/My Library/Folder3")