Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 94333 invoked from network); 22 Aug 2007 16:26:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Aug 2007 16:26:50 -0000 Received: (qmail 99068 invoked by uid 500); 22 Aug 2007 16:26:47 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 99030 invoked by uid 500); 22 Aug 2007 16:26:47 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 99019 invoked by uid 99); 22 Aug 2007 16:26:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Aug 2007 09:26:47 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Aug 2007 16:26:46 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 95F581A9823; Wed, 22 Aug 2007 09:26:26 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r568687 [4/4] - in /directory/studio/trunk/studio-apacheds-schemaeditor: resources/schemas/ src/main/java/org/apache/directory/studio/apacheds/schemaeditor/ src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/ Date: Wed, 22 Aug 2007 16:26:23 -0000 To: commits@directory.apache.org From: pamarcelot@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20070822162626.95F581A9823@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: directory/studio/trunk/studio-apacheds-schemaeditor/resources/schemas/samba.xml URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/resources/schemas/samba.xml?rev=568687&view=auto ============================================================================== --- directory/studio/trunk/studio-apacheds-schemaeditor/resources/schemas/samba.xml (added) +++ directory/studio/trunk/studio-apacheds-schemaeditor/resources/schemas/samba.xml Wed Aug 22 09:26:18 2007 @@ -0,0 +1,549 @@ + + + + + + sambaNextUserRid + + Next NT rid to give our for users + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.27 + integerMatch + + + + sambaOptionName + + Option Name + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.15 + caseIgnoreMatch + caseIgnoreSubstringsMatch + + + + sambaNextGroupRid + + Next NT rid to give out for groups + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.27 + integerMatch + + + + sambaAlgorithmicRidBase + + Base at which the samba RID generation algorithm should operate + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.27 + integerMatch + + + + sambaPwdCanChange + + Timestamp of when the user is allowed to update the password + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.27 + integerMatch + + + + sambaSID + + Security ID + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.26 + caseIgnoreIA5Match + + + + sambaBadPasswordCount + + Bad password attempt count + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.27 + integerMatch + + + + sambaShareName + + Share Name + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.15 + caseIgnoreMatch + + + + sambaLMPassword + + LanManager Password + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.26 + caseIgnoreIA5Match + + + + sambaPrimaryGroupSID + + Primary Group Security ID + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.26 + caseIgnoreIA5Match + + + + sambaBadPasswordTime + + Time of the last bad password attempt + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.27 + integerMatch + + + + sambaBoolOption + + A boolean option + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.7 + booleanMatch + + + + sambaMungedDial + + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.15 + caseExactMatch + + + + sambaPwdLastSet + + Timestamp of the last password update + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.27 + integerMatch + + + + sambaPwdMustChange + + Timestamp of when the password will expire + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.27 + integerMatch + + + + sambaAcctFlags + + Account Flags + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.26 + caseIgnoreIA5Match + + + + sambaIntegerOption + + An integer option + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.27 + integerMatch + + + + sambaStringListOption + + A string list option + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.15 + caseIgnoreMatch + + + + sambaNTPassword + + MD4 hash of the unicode password + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.26 + caseIgnoreIA5Match + + + + sambaStringOption + + A string option + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.26 + caseExactIA5Match + + + + sambaPrivilegeList + + Privileges List + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.26 + caseIgnoreIA5Match + + + + sambaHomeDrive + + Driver letter of home directory mapping + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.26 + caseIgnoreIA5Match + + + + sambaLogonScript + + Logon script path + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.15 + caseIgnoreMatch + + + + sambaPrivName + + name + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.15 + caseIgnoreMatch + caseIgnoreSubstringsMatch + + + + sambaLogonTime + + Timestamp of last logon + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.27 + integerMatch + + + + sambaDomainName + + Windows NT domain to which the user belongs + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.15 + caseIgnoreMatch + + + + sambaTrustFlags + + Trust Password Flags + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.26 + caseIgnoreIA5Match + + + + sambaLogoffTime + + Timestamp of last logoff + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.27 + integerMatch + + + + sambaUserWorkstations + + List of user workstations the user is allowed to logon to + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.15 + caseIgnoreMatch + + + + sambaHomePath + + Home directory UNC path + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.15 + caseIgnoreMatch + + + + sambaSIDList + + Security ID List + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.26 + caseIgnoreIA5Match + + + + sambaNextRid + + Next NT rid to give out for anything + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.27 + integerMatch + + + + sambaLogonHours + + Logon Hours + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.26 + caseIgnoreIA5Match + + + + sambaPasswordHistory + + Concatenated MD4 hashes of the unicode passwords used on this account + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.26 + caseIgnoreIA5Match + + + + sambaGroupType + + NT Group Type + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.27 + integerMatch + + + + sambaKickoffTime + + Timestamp of when the user will be logged off automatically + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.27 + integerMatch + + + + sambaProfilePath + + Roaming profile path + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.15 + caseIgnoreMatch + + + + + + sambaIdmapEntry + + Mapping from a SID to an ID + + top + + AUXILIARY + + sambaSID + + + uidNumber + gidNumber + + + + + sambaSidEntry + + Structural Class for a SID + + top + + STRUCTURAL + + sambaSID + + + + + sambaShare + + Samba Share Section + + top + + STRUCTURAL + + sambaShareName + + + description + + + + + sambaConfig + + Samba Configuration Section + + top + + AUXILIARY + + description + + + + + sambaPrivilege + + Samba Privilege + + top + + AUXILIARY + + sambaSID + + + sambaPrivilegeList + + + + + sambaGroupMapping + + Samba Group Mapping + + top + + AUXILIARY + + gidNumber + sambaSID + sambaGroupType + + + displayName + description + sambaSIDList + + + + + sambaConfigOption + + Samba Configuration Option + + top + + STRUCTURAL + + sambaOptionName + + + sambaBoolOption + sambaIntegerOption + sambaStringOption + sambaStringListOption + description + + + + + sambaSamAccount + + Samba 3.0 Auxilary SAM Account + + top + + AUXILIARY + + uid + sambaSID + + + cn + sambaLMPassword + sambaNTPassword + sambaPwdLastSet + sambaLogonTime + sambaLogoffTime + sambaKickoffTime + sambaPwdCanChange + sambaPwdMustChange + sambaAcctFlags + displayName + sambaHomePath + sambaHomeDrive + sambaLogonScript + sambaProfilePath + description + sambaUserWorkstations + sambaPrimaryGroupSID + sambaDomainName + sambaMungedDial + sambaBadPasswordCount + sambaBadPasswordTime + sambaPasswordHistory + sambaLogonHours + + + + + sambaTrustPassword + + Samba Trust Password + + top + + STRUCTURAL + + sambaDomainName + sambaNTPassword + sambaTrustFlags + + + sambaSID + sambaPwdLastSet + + + + + sambaDomain + + Samba Domain Information + + top + + STRUCTURAL + + sambaDomainName + sambaSID + + + sambaNextRid + sambaNextGroupRid + sambaNextUserRid + sambaAlgorithmicRidBase + + + + + sambaUnixIdPool + + Pool for allocating UNIX uids/gids + + top + + AUXILIARY + + uidNumber + gidNumber + + + + \ No newline at end of file Added: directory/studio/trunk/studio-apacheds-schemaeditor/resources/schemas/system.xml URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/resources/schemas/system.xml?rev=568687&view=auto ============================================================================== --- directory/studio/trunk/studio-apacheds-schemaeditor/resources/schemas/system.xml (added) +++ directory/studio/trunk/studio-apacheds-schemaeditor/resources/schemas/system.xml Wed Aug 22 09:26:18 2007 @@ -0,0 +1,932 @@ + + + + + + modifiersName + + RFC2252: name of last modifier + DIRECTORY_OPERATION + 1.3.6.1.4.1.1466.115.121.1.12 + distinguishedNameMatch + + + + dynamicSubtrees + + RFC2589: dynamic subtrees + DSA_OPERATION + 1.3.6.1.4.1.1466.115.121.1.12 + + + + subtreeSpecification + + DIRECTORY_OPERATION + 1.3.6.1.4.1.1466.115.121.1.45 + + + + administrativeRole + + DIRECTORY_OPERATION + 1.3.6.1.4.1.1466.115.121.1.38 + objectIdentifierMatch + + + + ref + + namedref: subordinate referral URL + DISTRIBUTED_OPERATION + 1.3.6.1.4.1.1466.115.121.1.15 + caseExactMatch + + + + supportedSASLMechanisms + + RFC2252: supported SASL mechanisms + DSA_OPERATION + 1.3.6.1.4.1.1466.115.121.1.15 + + + + vendorVersion + + RFC3045: version of implementation + DSA_OPERATION + 1.3.6.1.4.1.1466.115.121.1.15 + caseExactMatch + + + + supportedLDAPVersion + + RFC2252: supported LDAP versions + DSA_OPERATION + 1.3.6.1.4.1.1466.115.121.1.27 + + + + vendorName + + RFC3045: name of implementation vendor + DSA_OPERATION + 1.3.6.1.4.1.1466.115.121.1.15 + caseExactMatch + + + + supportedControl + + RFC2252: supported controls + DSA_OPERATION + 1.3.6.1.4.1.1466.115.121.1.38 + + + + matchingRuleUse + + RFC2252: matching rule uses + DIRECTORY_OPERATION + 1.3.6.1.4.1.1466.115.121.1.31 + objectIdentifierFirstComponentMatch + + + + ldapSyntaxes + + RFC2252: LDAP syntaxes + DIRECTORY_OPERATION + 1.3.6.1.4.1.1466.115.121.1.54 + objectIdentifierFirstComponentMatch + + + + supportedFeatures + + DSA_OPERATION + 1.3.6.1.4.1.1466.115.121.1.38 + objectIdentifierMatch + + + + userPassword + + RFC2256/2307: password of user + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.40 + octetStringMatch + + + + collectiveAttributeSubentries + + DIRECTORY_OPERATION + 1.3.6.1.4.1.1466.115.121.1.12 + distinguishedNameMatch + + + + name + + RFC2256: common supertype of name attributes + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.15 + caseIgnoreMatch + caseIgnoreSubstringsMatch + + + + subschemaSubentry + + RFC2252: name of controlling subschema entry + DIRECTORY_OPERATION + 1.3.6.1.4.1.1466.115.121.1.12 + distinguishedNameMatch + + + + namingContexts + + RFC2252: naming contexts + DSA_OPERATION + 1.3.6.1.4.1.1466.115.121.1.12 + + + + modifyTimestamp + + RFC2252: time which object was last modified + DIRECTORY_OPERATION + 1.3.6.1.4.1.1466.115.121.1.24 + generalizedTimeMatch + generalizedTimeOrderingMatch + + + + altServer + + RFC2252: alternative servers + DSA_OPERATION + 1.3.6.1.4.1.1466.115.121.1.26 + + + + supportedExtension + + RFC2252: supported extended operations + DSA_OPERATION + 1.3.6.1.4.1.1466.115.121.1.38 + + + + createTimestamp + + RFC2252: time which object was created + DIRECTORY_OPERATION + 1.3.6.1.4.1.1466.115.121.1.24 + generalizedTimeMatch + generalizedTimeOrderingMatch + + + + labeledURI + + RFC2079: Uniform Resource Identifier with optional label + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.15 + caseExactMatch + + + + distinguishedName + + RFC2256: common supertype of DN attributes + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.12 + distinguishedNameMatch + + + + dITContentRules + + RFC2252: DIT content rules + DIRECTORY_OPERATION + 1.3.6.1.4.1.1466.115.121.1.16 + objectIdentifierFirstComponentMatch + + + + matchingRules + + RFC2252: matching rules + DIRECTORY_OPERATION + 1.3.6.1.4.1.1466.115.121.1.30 + objectIdentifierFirstComponentMatch + + + + hasSubordinates + + X.501: entry has children + DIRECTORY_OPERATION + 1.3.6.1.4.1.1466.115.121.1.7 + booleanMatch + + + + nameForms + + RFC2252: name forms + DIRECTORY_OPERATION + 1.3.6.1.4.1.1466.115.121.1.35 + objectIdentifierFirstComponentMatch + + + + collectiveExclusions + + DIRECTORY_OPERATION + 1.3.6.1.4.1.1466.115.121.1.38 + objectIdentifierMatch + + + + entryTtl + + RFC2589: entry time-to-live + DSA_OPERATION + 1.3.6.1.4.1.1466.115.121.1.27 + + + + structuralObjectClass + + X.500(93): structural object class of entry + DIRECTORY_OPERATION + 1.3.6.1.4.1.1466.115.121.1.38 + objectIdentifierMatch + + + + cn + commonName + + RFC2256: common name(s) for which the entity is known by + name + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.15 + caseIgnoreMatch + caseIgnoreSubstringsMatch + + + + attributeTypes + + RFC2252: attribute types + DIRECTORY_OPERATION + 1.3.6.1.4.1.1466.115.121.1.3 + objectIdentifierFirstComponentMatch + + + + dITStructureRules + + RFC2252: DIT structure rules + DIRECTORY_OPERATION + 1.3.6.1.4.1.1466.115.121.1.17 + integerFirstComponentMatch + + + + aliasedObjectName + aliasedEntryName + + RFC2256: name of aliased object + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.12 + distinguishedNameMatch + + + + objectClass + + RFC2256: object classes of the entity + USER_APPLICATIONS + 1.3.6.1.4.1.1466.115.121.1.38 + objectIdentifierMatch + + + + creatorsName + + RFC2252: name of creator + DIRECTORY_OPERATION + 1.3.6.1.4.1.1466.115.121.1.12 + distinguishedNameMatch + + + + objectClasses + + RFC2252: object classes + DIRECTORY_OPERATION + 1.3.6.1.4.1.1466.115.121.1.37 + objectIdentifierFirstComponentMatch + + + + + + extensibleObject + + RFC2252: extensible object + + top + + AUXILIARY + + + + subschema + + RFC2252: controlling subschema (sub)entry + AUXILIARY + + dITStructureRules + nameForms + dITContentRules + objectClasses + attributeTypes + matchingRules + matchingRuleUse + + + + + OpenLDAProotDSE + LDAProotDSE + + OpenLDAP Root DSE object + + top + + STRUCTURAL + + cn + + + + + alias + + RFC2256: an alias + + top + + STRUCTURAL + + aliasedObjectName + + + + + subentry + + + top + + STRUCTURAL + + cn + subtreeSpecification + + + + + collectiveAttributeSubentry + + AUXILIARY + + + + dynamicObject + + RFC2589: Dynamic Object + + top + + AUXILIARY + + + + top + + top of the superclass chain + ABSTRACT + + objectClass + + + + + referral + + namedref: named subordinate referral + + top + + STRUCTURAL + + ref + + + + + + + integerMatch + + 1.3.6.1.4.1.1466.115.121.1.27 + + + + caseIgnoreOrderingMatch + + 1.3.6.1.4.1.1466.115.121.1.15 + + + + directoryStringFirstComponentMatch + + 1.3.6.1.4.1.1466.115.121.1.15 + + + + caseIgnoreIA5SubstringsMatch + + 1.3.6.1.4.1.1466.115.121.1.58 + + + + caseIgnoreSubstringsMatch + + 1.3.6.1.4.1.1466.115.121.1.58 + + + + caseIgnoreIA5Match + + 1.3.6.1.4.1.1466.115.121.1.26 + + + + caseIgnoreListSubstringsMatch + + 1.3.6.1.4.1.1466.115.121.1.58 + + + + generalizedTimeMatch + + 1.3.6.1.4.1.1466.115.121.1.24 + + + + numericStringMatch + + 1.3.6.1.4.1.1466.115.121.1.36 + + + + distinguishedNameMatch + + 1.3.6.1.4.1.1466.115.121.1.12 + + + + presentationAddressMatch + + 1.3.6.1.4.1.1466.115.121.1.43 + + + + caseIgnoreListMatch + + 1.3.6.1.4.1.1466.115.121.1.41 + + + + booleanMatch + + 1.3.6.1.4.1.1466.115.121.1.7 + + + + protocolInformationMatch + + 1.3.6.1.4.1.1466.115.121.1.42 + + + + caseExactOrderingMatch + + 1.3.6.1.4.1.1466.115.121.1.15 + + + + caseExactIA5Match + + 1.3.6.1.4.1.1466.115.121.1.26 + + + + objectIdentifierMatch + + 1.3.6.1.4.1.1466.115.121.1.38 + + + + integerFirstComponentMatch + + 1.3.6.1.4.1.1466.115.121.1.27 + + + + numericStringSubstringsMatch + + 1.3.6.1.4.1.1466.115.121.1.58 + + + + caseExactSubstringsMatch + + 1.3.6.1.4.1.1466.115.121.1.58 + + + + telephoneNumberMatch + + 1.3.6.1.4.1.1466.115.121.1.50 + + + + octetStringOrderingMatch + + 1.3.6.1.4.1.1466.115.121.1.40 + + + + integerOrderingMatch + + 1.3.6.1.4.1.1466.115.121.1.27 + + + + uniqueMemberMatch + + 1.3.6.1.4.1.1466.115.121.1.34 + + + + bitStringMatch + + 1.3.6.1.4.1.1466.115.121.1.6 + + + + objectIdentifierFirstComponentMatch + + 1.3.6.1.4.1.1466.115.121.1.38 + + + + caseExactMatch + + 1.3.6.1.4.1.1466.115.121.1.15 + + + + octetStringMatch + + 1.3.6.1.4.1.1466.115.121.1.40 + + + + generalizedTimeOrderingMatch + + 1.3.6.1.4.1.1466.115.121.1.24 + + + + telephoneNumberSubstringsMatch + + 1.3.6.1.4.1.1466.115.121.1.58 + + + + caseIgnoreMatch + + 1.3.6.1.4.1.1466.115.121.1.15 + + + + + + Supplier And Consumer + + + + + Modify Rights + + + + + Country String + + + + + Supported Algorithm + + + + + OID + + + + + Data Quality Syntax + + + + + LDAP BootstrapSchema Description + + + + + Name Form Description + + + + + Enhanced Guide + + + + + Telex Number + + + + + ACI Item + + + + + Presentation Address + + + + + Trigger Specification + + + + + Facsimile Telephone Number + + + + + Attribute Type Description + + + + + Object Class Description + + + + + Printable String + + + + + Directory String + + + + + LDAP BootstrapSchema Definition + + + + + DN + + + + + Subtree Specification + + + + + Fax + + + + + Access Point + + + + + Name And Optional UID + + + + + Certificate + + + + + UTC Time + + + + + Protocol Information + + + + + Supplier Or Consumer + + + + + DSA Quality Syntax + + + + + Mail Preference + + + + + Postal Address + + + + + MHS OR Address + + + + + IA5 String + + + + + Octet String + + + + + Bit String + + + + + DIT Content Rule Description + + + + + Other Mailbox + + + + + DIT Structure Rule Description + + + + + Boolean + + + + + INTEGER + + + + + Generalized Time + + + + + Supplier Information + + + + + Audio + + + + + Substring Assertion + + + + + Certificate List + + + + + Matching Rule Description + + + + + Numeric String + + + + + Delivery Method + + + + + Teletex Terminal Identifier + + + + + DL Submit Permission + + + + + JPEG + + + + + Telephone Number + + + + + Master And Shadow Access Points + + + + + DSE Type + + + + + Binary + + + + + Certificate Pair + + + + + Matching Rule Use Description + + + + + Guide + + + + + LDAP Syntax Description + + + + \ No newline at end of file Modified: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/PluginUtils.java URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/PluginUtils.java?rev=568687&r1=568686&r2=568687&view=diff ============================================================================== --- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/PluginUtils.java (original) +++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/PluginUtils.java Wed Aug 22 09:26:18 2007 @@ -24,15 +24,20 @@ import java.io.File; import java.io.FileWriter; import java.io.IOException; +import java.net.URL; import org.apache.directory.studio.apacheds.schemaeditor.controller.ProjectsHandler; import org.apache.directory.studio.apacheds.schemaeditor.model.AttributeTypeImpl; import org.apache.directory.studio.apacheds.schemaeditor.model.ObjectClassImpl; import org.apache.directory.studio.apacheds.schemaeditor.model.Project; +import org.apache.directory.studio.apacheds.schemaeditor.model.Schema; import org.apache.directory.studio.apacheds.schemaeditor.model.io.ProjectsExporter; import org.apache.directory.studio.apacheds.schemaeditor.model.io.ProjectsImportException; import org.apache.directory.studio.apacheds.schemaeditor.model.io.ProjectsImporter; +import org.apache.directory.studio.apacheds.schemaeditor.model.io.XMLSchemaFileImportException; +import org.apache.directory.studio.apacheds.schemaeditor.model.io.XMLSchemaFileImporter; import org.apache.directory.studio.apacheds.schemaeditor.view.ViewUtils; +import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Status; @@ -206,5 +211,44 @@ Activator.getDefault().getLog().log( new Status( Status.WARNING, Activator.getDefault().getBundle().getSymbolicName(), Status.OK, message, exception ) ); + } + + + /** + * Loads the 'core' corresponding to the given name. + * + * @param schemaName + * the name of the 'core' schema + * @return + * the corresponding schema, or null if no schema has been found + */ + public static Schema loadCoreSchema( String schemaName ) + { + Schema schema = null; + + try + { + URL url = Platform.getBundle( Activator.PLUGIN_ID ) + .getResource( "resources/schemas/" + schemaName + ".xml" ); + + if ( url == null ) + { + PluginUtils.logError( "An error occured when loading the schema " + schemaName + ".", null ); + ViewUtils.displayErrorMessageBox( "Projects Saving Error", "An error occured when loading the schema " + + schemaName + "." ); + } + else + { + schema = XMLSchemaFileImporter.getSchema( url.toString() ); + } + } + catch ( XMLSchemaFileImportException e ) + { + PluginUtils.logError( "An error occured when loading the schema " + schemaName + ".", e ); + ViewUtils.displayErrorMessageBox( "Projects Saving Error", "An error occured when loading the schema " + + schemaName + "." ); + } + + return schema; } } Modified: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewProjectWizard.java URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewProjectWizard.java?rev=568687&r1=568686&r2=568687&view=diff ============================================================================== --- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewProjectWizard.java (original) +++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewProjectWizard.java Wed Aug 22 09:26:18 2007 @@ -21,8 +21,10 @@ import org.apache.directory.studio.apacheds.schemaeditor.Activator; +import org.apache.directory.studio.apacheds.schemaeditor.PluginUtils; import org.apache.directory.studio.apacheds.schemaeditor.controller.ProjectsHandler; import org.apache.directory.studio.apacheds.schemaeditor.model.Project; +import org.apache.directory.studio.apacheds.schemaeditor.model.Schema; import org.apache.directory.studio.apacheds.schemaeditor.model.Project.ProjectType; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.wizard.IWizardPage; @@ -70,6 +72,26 @@ public boolean performFinish() { Project project = new Project( informationPage.getProjectType(), informationPage.getProjectName() ); + if ( informationPage.getProjectType().equals( ProjectType.APACHE_DIRECTORY_SERVER ) ) + { + // TODO: Add connection information. + } + else if ( informationPage.getProjectType().equals( ProjectType.OFFLINE ) ) + { + String[] selectedSchemas = schemasSelectionPage.getSelectedSchemas(); + if ( selectedSchemas != null ) + { + for ( String selectedSchema : selectedSchemas ) + { + Schema schema = PluginUtils.loadCoreSchema( selectedSchema ); + if ( schema != null ) + { + project.getSchemaHandler().addSchema( schema ); + } + } + } + } + ProjectsHandler projectsHandler = Activator.getDefault().getProjectsHandler(); projectsHandler.addProject( project ); projectsHandler.openProject( project ); Modified: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewProjectWizardSchemasSelectionPage.java URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewProjectWizardSchemasSelectionPage.java?rev=568687&r1=568686&r2=568687&view=diff ============================================================================== --- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewProjectWizardSchemasSelectionPage.java (original) +++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewProjectWizardSchemasSelectionPage.java Wed Aug 22 09:26:18 2007 @@ -20,6 +20,8 @@ package org.apache.directory.studio.apacheds.schemaeditor.view.wizards; +import java.util.Arrays; + import org.apache.directory.studio.apacheds.schemaeditor.Activator; import org.apache.directory.studio.apacheds.schemaeditor.PluginConstants; import org.eclipse.jface.viewers.ArrayContentProvider; @@ -27,9 +29,12 @@ import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Table; @@ -69,15 +74,18 @@ public void createControl( Composite parent ) { Composite composite = new Composite( parent, SWT.NONE ); - composite.setLayout( new GridLayout() ); + composite.setLayout( new GridLayout( 2, false ) ); + composite.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true ) ); // Core Schemas TableViewer Label label = new Label( composite, SWT.NONE ); label.setText( "Choose the 'core' schemas to include in the project:" ); - label.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) ); + label.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 2, 1 ) ); coreSchemasTableViewer = new CheckboxTableViewer( new Table( composite, SWT.BORDER | SWT.CHECK | SWT.FULL_SELECTION ) ); - coreSchemasTableViewer.getTable().setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true ) ); + GridData gridData = new GridData( SWT.FILL, SWT.NONE, true, false, 1, 2 ); + gridData.heightHint = 160; + coreSchemasTableViewer.getTable().setLayoutData( gridData ); coreSchemasTableViewer.setContentProvider( new ArrayContentProvider() ); coreSchemasTableViewer.setLabelProvider( new LabelProvider() { @@ -88,6 +96,28 @@ } } ); + Button coreSchemasTableSelectAllButton = new Button( composite, SWT.PUSH ); + coreSchemasTableSelectAllButton.setText( "Select All" ); + coreSchemasTableSelectAllButton.setLayoutData( new GridData( SWT.FILL, SWT.BEGINNING, false, false ) ); + coreSchemasTableSelectAllButton.addSelectionListener( new SelectionAdapter() + { + public void widgetSelected( SelectionEvent e ) + { + coreSchemasTableViewer.setAllChecked( true ); + } + } ); + + Button coreSchemasTableDeselectAllButton = new Button( composite, SWT.PUSH ); + coreSchemasTableDeselectAllButton.setText( "Deselect All" ); + coreSchemasTableDeselectAllButton.setLayoutData( new GridData( SWT.FILL, SWT.BEGINNING, false, false ) ); + coreSchemasTableDeselectAllButton.addSelectionListener( new SelectionAdapter() + { + public void widgetSelected( SelectionEvent e ) + { + coreSchemasTableViewer.setAllChecked( false ); + } + } ); + initFields(); setControl( composite ); @@ -100,7 +130,8 @@ private void initFields() { coreSchemasTableViewer.setInput( new String[] - { "core", "mozilla", "system" } ); + { "apache", "apachedns", "apachemeta", "autofs", "collective", "corba", "core", "cosine", "dhcp", + "inetorgperson", "java", "krb5kdc", "mozilla", "nis", "samba", "system" } ); } @@ -112,6 +143,6 @@ */ public String[] getSelectedSchemas() { - return ( String[] ) coreSchemasTableViewer.getCheckedElements(); + return Arrays.asList( coreSchemasTableViewer.getCheckedElements() ).toArray( new String[0] ); } }