Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v44 update, reduce MetadataService file size, support non-virtual types #227

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rmccu
Copy link

@rmccu rmccu commented Dec 4, 2018

  1. updated to v44.0 (Winter '19) of the API
  2. attempt to generate a smaller MetadataService class (see details below)
  3. Support for nested inheritance and non-virtual types
  4. Misc updates, PMD cleanup, adding squirly braces, etc.

in an effort to create a smaller class file (and stay under the 1mb limit):

  • use 'NS' instead of 'SOAP_M_URI' for the static variable name, saves 8 bytes per use
  • use tabs instead of spaces
  • replaced some more instances where the namespace URL was used (such as in the _info array)

put static final variables at top of class that specify 'MetadataServiceImported' and 'MetadataService' classes so it is easier to change if needed

2) attempt to generate a smaller MetadataService class (see details below)
3) Support for nested inheritance and non-virtual types
4) Misc updates, PMD cleanup, adding squirly braces, etc.

in an effort to create a smaller class file (and stay under the 1mb limit):
 * use 'NS' instead of 'SOAP_M_URI' for the static variable name, saves 8 bytes per use
 * use tabs instead of spaces
 * replaced some more instances where the namespace URL was used (such as in the _info array)

put static final variables at top of class that specify 'MetadataServiceImported' and 'MetadataService' classes so it is easier to change if needed
@rmccu
Copy link
Author

rmccu commented Dec 4, 2018

@afawcett here is the PR. Note that I also commented out a few types that did not appear to exist in my metadata.xml WSDL file. These may not be enabled in all orgs.

This PR should address #141, #186, and #84.

@rmccu
Copy link
Author

rmccu commented Dec 4, 2018

Hmm, the diff in github isn't great. It looks like a lot more change than there really is. If you ignore differences in whitespace, it actually looks a lot cleaner.

Let me know if I did this right, or if I need to make changes and re-submit.

@dbtavernerffdc
Copy link

@rmccu I've approved but this code doesn't deploy for me. It looks like MetadataServiceExamples and MetadataServiceTest both need updating to reflect the changed types. Also I'm not sure why Metadata.Picklist no longer exists.

classes/MetadataDataController.cls(1326,16):Dependent class is invalid and needs recompilation:
 Class MetadataServiceExamples : Variable does not exist: gracePeriodDays
classes/MetadataServiceTest.cls(1075,9):Invalid type: MetadataService.ReadXOrgHubResult
classes/MetadataServiceExamples.cls(1326,16):Variable does not exist: gracePeriodDays
classes/MetadataServiceTest.cls(268,9):Invalid type: MetadataService.Picklist
classes/MetadataServiceTest.cls(809,9):Invalid type: MetaDataService.XOrgHub
classes/MetadataServiceTest.cls(813,9):Invalid type: MetadataService.DataPipeline
classes/MetadataServiceTest.cls(816,9):Invalid type: MetaDataService.XOrgHubSharedObject
classes/MetadataServiceTest.cls(827,9):Invalid type: MetadataService.ReadXOrgHubResult
classes/MetadataServiceTest.cls(828,9):Invalid type: MetadataService.readXOrgHubResponse_element
classes/MetadataServiceTest.cls(870,9):Invalid type: MetaDataService.PersonalJourneySettings
classes/MetadataServiceTest.cls(877,9):Invalid type: MetadataService.ReadPersonalJourneySettingsResult
classes/MetadataServiceTest.cls(878,9):Invalid type: MetaDataService.readPersonalJourneySettingsResponse_element
classes/MetadataServiceTest.cls(927,9):Invalid type: MetadataService.EventType
classes/MetadataServiceTest.cls(954,9):Invalid type: MetadataService.CustomExperienceBranding
classes/MetadataServiceTest.cls(955,9):Invalid type: MetadataService.EventTypeParameter
classes/MetadataServiceTest.cls(965,9):Invalid type: MetadataService.CustomExperience
classes/MetadataServiceTest.cls(988,9):Invalid type: MetadataService.CustomExperienceTabSet
classes/MetadataServiceTest.cls(1082,9):Invalid type: MetadataService.ReadPersonalJourneySettingsResult
classes/MetadataServiceTest.cls(1137,9):Invalid type: MetadataService.ReadEventTypeResult
classes/MetadataServiceTest.cls(1159,3):Invalid type: MetadataService.ReadCaseSubjectParticleResult
classes/MetadataServiceTest.cls(1160,3):Invalid type: MetadataService.ReadNetworkBrandingResult
classes/MetadataServiceTest.cls(1161,3):Invalid type: MetadataService.ReadSocialCustomerServiceSettingsResult
classes/MetadataServiceTest.cls(1162,3):Invalid type: MetadataService.ReadTopicsForObjectsResult
classes/MetadataServiceTest.cls(1304,9):Invalid type: MetadataService.readXOrgHubResponse_element
classes/MetadataServiceTest.cls(1311,9):Invalid type: MetadataService.readPersonalJourneySettingsResponse_element
classes/MetadataServiceTest.cls(1320,9):Invalid type: MetadataService.readEventTypeResponse_element
classes/MetadataServiceTest.cls(1343,9):Invalid type: MetadataService.readCaseSubjectParticleResponse_element
classes/MetadataServiceTest.cls(1344,9):Invalid type: MetadataService.readNetworkBrandingResponse_element
classes/MetadataServiceTest.cls(1345,9):Invalid type: MetadataService.readSocialCustomerServiceSettingsResponse_element
classes/MetadataServiceTest.cls(1346,9):Invalid type: MetadataService.readTopicsForObjectsResponse_element
pages/metadatadata.page(metadatadata):Apex class 'MetadataDataController' does not exist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants