|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.ixb.handlers.netmarkets.ProjectIXUtils
Field Summary | |
private static String |
_rb
|
private static int[] |
DEF_FROM_INDEXES
|
private static Object[] |
DEF_PARAMS
|
private static String |
DEFAULT_ENCODING
|
private static String |
DEFAULT_LIFECYCLE
|
static String |
DOMAIN_ID
|
private static Map |
domainPaths
|
private static Object[] |
EMPTY_ARRAY
|
private static NMProjectConstants.EngineRuleInfo |
engineTags
|
private static Class |
ENUM_TYPE_CLASS
|
private static String |
EPM_NAVIGATOR
|
private static String |
HEADER_ENCODING
|
private static NMProjectConstants.ProjectMemberInfo |
memberTags
|
private static Class |
OBJ_REF_CLASS
|
private static NMProjectConstants.ObjectIDInfo |
oidInfoTags
|
private static String |
PJL_NULL
|
private static PrepMapFile |
pmf
|
private static String |
PROJ_MGMT_KEY
|
(package private) static String |
USER_KEY
|
private static boolean |
VERBOSE
|
private static Class |
WT_OBJECT_CLASS
|
Constructor Summary | |
ProjectIXUtils()
|
Method Summary | |
static void |
addRoleElem(IxbElement elem,
Role role)
Adds a role element to the passed element. |
static boolean |
checkBufferSanity(StringBuffer strBuff)
|
static PushbackInputStream |
checkStreamSanity(InputStream in)
This method performs a sanity check on an input stream. |
static void |
checkTag(IxbElement elem,
String expected_tag)
|
static void |
checkTags(IxbElement elem,
String[] possibletags)
|
private static DirectoryContextProvider[] |
computeContexts(WTContainerRef contRef)
|
static StringBuffer |
convertCsv2XML(StringBuffer buffer)
Converts the passed in stringbuffer which had better correspond to a CSV stream into a stringbuffer to the corresponding XML. |
static void |
copyStream(InputStream in,
OutputStream out)
Copies an input stream to an output stream. |
static File |
exportDocumentToJarFile(WTContainerRef contRef,
WTDocument document,
File tmpFile)
|
static File |
exportFolderStructureToJarFile(WTContainerRef contRef,
Folder folder,
File tmpFile)
|
static File |
exportProductStructureToJarFile(WTContainerRef contRef,
List parts,
File tmpFile)
|
static File |
exportProjectToJarFile(WTContainerRef contRef,
Project2 project,
File tmpFile)
|
static void |
exportReference(Persistable pers_obj,
IxbElement elem,
Exporter exporter)
|
static File |
exportToJarFile(WTContainerRef contRef,
Persistable persistObj,
File tmpFile)
|
static void |
exportWTDocument(WTDocument doc,
IxbElement elem,
Exporter exporter)
Exports a document into the given IxbElement. |
static void |
exportWTPart(WTPart part,
IxbElement elem,
Exporter exporter)
|
static IxbDocument |
generateExportMappingRules()
|
static IxbDocument |
generateFolderMappingRules(Folder theFolder)
This generates mapping rules for the savePath. |
static IxbDocument |
generateImportMappingRules()
|
private static IxbDocument |
generateImportMappingRules(NotebookFolder notebook_folder)
|
static AdminDomainRef |
getAdminDomainRefFromRelativePath(WTContainerRef contRef,
String relativePath)
|
static ConfigSpec |
getConfigSpecForSandbox(WTContainerRef contRef)
|
private static WTGroup |
getContainerGroup(ContainerTeamManaged ctm,
String groupKey,
String princName)
|
static QueryResult |
getDocuments(WTContainerRef cont_ref)
Returns documents contained in project. |
static String |
getEncoding(File xmlFile)
Get the character encoding that is specified in the XML file. |
static String |
getEncoding(String xmlText)
Get the character encoding that is specified in the XML text. |
private static String |
getEncodingFromHeader(String header)
Get the character encoding that is specified in the given XML header. |
static QueryResult |
getEPMDocuments(WTContainerRef cont_ref)
Returns epm documents contained in project. |
private static String |
getFolderPath(NotebookFolder folder)
|
static String |
getFullyQualifiedDomainPath(WTContainerRef contRef,
String relativePath)
|
static WTGroup |
getGroupByName(WTContainerRef contRef,
String princName)
|
private static String |
getHeader(File file)
Get the |
private static String |
getHeader(InputStream is)
Get the |
private static String |
getHeader(String content)
Get the |
private ObjectIdentifier |
getId(Object obj)
|
private static String |
getIdStr(Object obj)
|
static Iterated |
getIteratedObject(WTContainerRef contRef,
Class theClass,
String attrName,
String attrValue)
|
static QueryResult |
getObjects(WTContainerRef cont_ref,
Class object_class)
Returns objects of a given class contained in project. |
static Object |
getObjFromObjectIDElement(IxbElement objId,
Importer imp)
ObjectIds may come in two flavors. |
static Object |
getObjFromObjRefElem(IxbElement objRef,
Importer imp)
ObjectReferences can come in three flavors localId, ufid, and custom. |
private static ObjectIdentifier |
getOid(Object obj)
|
static QueryResult |
getParts(WTContainerRef cont_ref)
Returns parts contained in project. |
static WTPrincipal |
getPrincipalByDN(String dnName)
|
static WTPrincipal |
getPrincipalByName(WTContainerRef contRef,
String princName)
|
static Set |
getProductStructSet(WTContainerRef cont_ref)
|
static Project2 |
getProject(String project_name)
|
static Reader |
getReader(File xmlFile)
Get a Reader on the contents of the specified
File . |
static ObjectReference |
getReference(String ref_str,
Importer imp)
|
static Role |
getRole(IxbElement role_elem)
Returns a role given an IxbElement corresponding to the Role tag. |
static WTUser |
getUserByDN(String dnName)
|
static EmailUser |
getUserFromMembershipTag(IxbElement elem,
WTContainerRef contRef)
|
static boolean |
hasTag(IxbElement elem,
String expected_tag)
|
static boolean |
importFromJarFile(Object obj,
String file_name)
|
static boolean |
importFromJarFile(WTContainerRef contRef,
Object obj,
String file_name)
|
static boolean |
importFromJarFileToContainer(WTContainerRef target,
File tmpFile)
|
static boolean |
importFromJarFileToFolder(Folder folder,
File tmpFile)
|
static boolean |
importFromJarFileToNotebook(NotebookFolder notebook_folder,
File tmpFile)
|
static boolean |
importFromJarFileToProject(WTContainerRef target,
File tmpFile)
|
static boolean |
isRootDomain(AdministrativeDomain domain,
WTContainer container)
|
private static List |
populateContextProviders(WTContainerRef contRef,
List contextList)
|
static Rule |
populateEngineBaseInfo(IxbElement elem,
String ruleType,
Importer imp)
This method initializes all the base rule information except the enabled status. |
static void |
postExportFeedback(String rb,
String key)
|
static void |
postExportFeedback(String rb,
String key,
Object[] params)
|
static void |
postFeedback(Importer imp,
String rb,
String key,
Object[] params,
int level)
Posts message to the logger. |
private static boolean |
processBooleanStr(String str)
|
static Rule |
setRuleEnabledStatus(Rule rule,
IxbElement elem)
Set the enabled status of the rule to the specified value. |
static void |
setTmpId(IxbElement elem,
Importer imp)
Takes an ObjectId object and if the object id is a localId, we store the tmpId. |
static String |
showObjs(Collection objs)
|
private static void |
updateFolderPathRules(IxbElement rootElem,
String path,
String value,
String newValue)
|
private static void |
updateLifecyclePathRules(IxbElement rootElement)
|
static boolean |
validateXMLInputStream(InputStream in)
This method does some simple validation on the input stream to verify that its contents do in fact contain an XML file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final boolean VERBOSE
private static final String EPM_NAVIGATOR
static final String USER_KEY
private static final String _rb
private static final String PJL_NULL
private static final String PROJ_MGMT_KEY
private static final String DEFAULT_LIFECYCLE
private static final Object[] DEF_PARAMS
private static final Class ENUM_TYPE_CLASS
private static final Class OBJ_REF_CLASS
private static final Class WT_OBJECT_CLASS
private static final String DEFAULT_ENCODING
private static final String HEADER_ENCODING
private static final NMProjectConstants.ObjectIDInfo oidInfoTags
private static final NMProjectConstants.ProjectMemberInfo memberTags
private static final NMProjectConstants.EngineRuleInfo engineTags
private static final PrepMapFile pmf
public static final String DOMAIN_ID
private static Map domainPaths
private static final int[] DEF_FROM_INDEXES
private static final Object[] EMPTY_ARRAY
Constructor Detail |
public ProjectIXUtils()
Method Detail |
public static void exportReference(Persistable pers_obj, IxbElement elem, Exporter exporter) throws WTException
This implementation is limited to the localId option.
WTException
public static void checkTag(IxbElement elem, String expected_tag) throws WTException
WTException
public static void checkTags(IxbElement elem, String[] possibletags) throws WTException
WTException
public static boolean hasTag(IxbElement elem, String expected_tag) throws WTException
WTException
public static ObjectReference getReference(String ref_str, Importer imp) throws WTException
WTException
public static Object getObjFromObjectIDElement(IxbElement objId, Importer imp) throws WTException
WTException
- if the tag is not an ObjectID tag.public static Object getObjFromObjRefElem(IxbElement objRef, Importer imp) throws WTException
WTException
public static void setTmpId(IxbElement elem, Importer imp) throws WTException
WTException
public static Rule populateEngineBaseInfo(IxbElement elem, String ruleType, Importer imp) throws WTException
WTException
setRuleEnabledStatus
public static final Rule setRuleEnabledStatus(Rule rule, IxbElement elem) throws WTException
rule
- the rule whose enabled status should be setelem
- the element containing the enabled status info
WTException
public static boolean validateXMLInputStream(InputStream in) throws WTException
WTException
public static boolean checkBufferSanity(StringBuffer strBuff) throws WTException
WTException
public static PushbackInputStream checkStreamSanity(InputStream in) throws WTException
WTException
public static File exportToJarFile(WTContainerRef contRef, Persistable persistObj, File tmpFile) throws WTException
WTException
public static File exportDocumentToJarFile(WTContainerRef contRef, WTDocument document, File tmpFile) throws WTException
WTException
public static File exportProductStructureToJarFile(WTContainerRef contRef, List parts, File tmpFile) throws WTException
WTException
public static File exportFolderStructureToJarFile(WTContainerRef contRef, Folder folder, File tmpFile) throws WTException
WTException
public static File exportProjectToJarFile(WTContainerRef contRef, Project2 project, File tmpFile) throws WTException
WTException
public static boolean importFromJarFile(Object obj, String file_name) throws WTException
WTException
public static boolean importFromJarFile(WTContainerRef contRef, Object obj, String file_name) throws WTException
WTException
public static boolean importFromJarFileToProject(WTContainerRef target, File tmpFile) throws WTException
WTException
public static boolean importFromJarFileToContainer(WTContainerRef target, File tmpFile) throws WTException
WTException
public static boolean importFromJarFileToFolder(Folder folder, File tmpFile) throws WTException
WTException
public static boolean importFromJarFileToNotebook(NotebookFolder notebook_folder, File tmpFile) throws WTException
WTException
private static IxbDocument generateImportMappingRules(NotebookFolder notebook_folder) throws WTException
WTException
public static IxbDocument generateFolderMappingRules(Folder theFolder) throws WTException
WTException
public static IxbDocument generateExportMappingRules() throws WTException
WTException
public static IxbDocument generateImportMappingRules() throws WTException
WTException
private static final void updateLifecyclePathRules(IxbElement rootElement) throws WTException
WTException
private static final void updateFolderPathRules(IxbElement rootElem, String path, String value, String newValue) throws WTException
WTException
public static void copyStream(InputStream in, OutputStream out) throws WTException
WTException
public static void postFeedback(Importer imp, String rb, String key, Object[] params, int level) throws WTException
WTException
public static void postExportFeedback(String rb, String key) throws WTException
WTException
public static void postExportFeedback(String rb, String key, Object[] params) throws WTException
WTException
public static QueryResult getDocuments(WTContainerRef cont_ref) throws WTException
WTException
public static QueryResult getEPMDocuments(WTContainerRef cont_ref) throws WTException
WTException
public static QueryResult getParts(WTContainerRef cont_ref) throws WTException
WTException
public static Set getProductStructSet(WTContainerRef cont_ref) throws WTException
WTException
public static QueryResult getObjects(WTContainerRef cont_ref, Class object_class) throws WTException
WTException
public static Project2 getProject(String project_name) throws WTException
WTException
public static Role getRole(IxbElement role_elem) throws WTException
WTException
public static void addRoleElem(IxbElement elem, Role role) throws WTException
WTException
public static Reader getReader(File xmlFile) throws IOException
Reader
on the contents of the specified
File
. Make sure the correct character encoding is used
when reading the XML file content.
xmlFile
- the file containg the XML
IOException
public static String getEncoding(String xmlText) throws IOException
null
if no encoding is specified in the
file.
xmlText
- a string containing well-formed XML text
IOException
public static String getEncoding(File xmlFile) throws IOException
null
if no encoding is specified in the
file.
xmlFile
- a file containing well-formed XML text
IOException
private static String getEncodingFromHeader(String header)
null
if no encoding
is specified in the declaration.
private static String getHeader(String content) throws IOException
content
- a string containing well-formed XML
IOException
private static String getHeader(File file) throws IOException
IOException
private static String getHeader(InputStream is) throws IOException
IOException
private static String getFolderPath(NotebookFolder folder) throws WTException
WTException
private ObjectIdentifier getId(Object obj)
private static boolean processBooleanStr(String str)
public static Iterated getIteratedObject(WTContainerRef contRef, Class theClass, String attrName, String attrValue) throws WTException
WTException
public static WTPrincipal getPrincipalByName(WTContainerRef contRef, String princName) throws WTException
WTException
private static DirectoryContextProvider[] computeContexts(WTContainerRef contRef) throws WTException
WTException
private static List populateContextProviders(WTContainerRef contRef, List contextList) throws WTException
WTException
public static EmailUser getUserFromMembershipTag(IxbElement elem, WTContainerRef contRef) throws WTException
WTException
public static WTGroup getGroupByName(WTContainerRef contRef, String princName) throws WTException
WTException
private static WTGroup getContainerGroup(ContainerTeamManaged ctm, String groupKey, String princName) throws WTException
WTException
public static StringBuffer convertCsv2XML(StringBuffer buffer) throws WTException
WTException
public static ConfigSpec getConfigSpecForSandbox(WTContainerRef contRef) throws WTException
WTException
public static String getFullyQualifiedDomainPath(WTContainerRef contRef, String relativePath) throws WTException
WTException
public static AdminDomainRef getAdminDomainRefFromRelativePath(WTContainerRef contRef, String relativePath) throws WTException
WTException
public static boolean isRootDomain(AdministrativeDomain domain, WTContainer container) throws WTException
WTException
public static WTPrincipal getPrincipalByDN(String dnName) throws WTException
WTException
public static WTUser getUserByDN(String dnName) throws WTException
WTException
private static String getIdStr(Object obj) throws WTException
WTException
public static String showObjs(Collection objs) throws WTException
WTException
public static void exportWTDocument(WTDocument doc, IxbElement elem, Exporter exporter) throws WTException
WTException
public static void exportWTPart(WTPart part, IxbElement elem, Exporter exporter) throws WTException
WTException
private static ObjectIdentifier getOid(Object obj) throws WTException
WTException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |